LivingEntityUseItemFinishEvent

Link to livingentityuseitemfinishevent

Fired after an item has fully finished being used. The item has been notified that it was used, and the item/result stacks reflect after that state. This means that when this is fired for a Potion, the potion effect has already been applied.

If you wish to cancel those effects, you should cancel one of the above events.

The result item stack is the stack that is placed in the player's inventory in replacement of the stack that is currently being used.

The event is not cancelable.

The event does not have a result.

Импорт класса

Link to импорт-класса

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.event.entity.living.use.LivingEntityUseItemFinishEvent;

Extending LivingEntityUseItemEvent

Link to extending-livingentityuseitemevent

LivingEntityUseItemFinishEvent extends LivingEntityUseItemEvent. That means all methods available in LivingEntityUseItemEvent are also available in LivingEntityUseItemFinishEvent

Name: getResultStack

Return Type: IItemStack

ZenScript
Copy
// LivingEntityUseItemFinishEvent.getResultStack() as IItemStack

myLivingEntityUseItemFinishEvent.getResultStack();

Name: setResultStack

Return Type: void

ZenScript
Copy
LivingEntityUseItemFinishEvent.setResultStack(stack as IItemStack) as void
ПараметрТипОписание
Параметр
stack
Тип
IItemStack
Описание
No Description Provided

Свойства

Link to свойства

НазваниеТипИмеет GetterИмеет SetterОписание
Название
resultStack
Тип
IItemStack
Имеет Getter
true
Имеет Setter
true
Описание
No Description Provided