LivingEntityUseItem
Link to livingentityuseitem
The LivingEntityUseItem event is fired whenever an entity starts using an item, stops doing so, after the player finishes using an item and each tick they use the item.
Since that would be called far too often, there are 4 subEvents that are only called in their specific case.
Импорт класса
Link to импорт-класса
It might be required to import the class to avoid errors.
ZenScript Copy//Base Event
import crafttweaker.event.EntityLivingUseItemEvent.All;
//Specific Events
import crafttweaker.event.EntityLivingUseItemEvent.Start;
import crafttweaker.event.EntityLivingUseItemEvent.Tick;
import crafttweaker.event.EntityLivingUseItemEvent.Stop;
import crafttweaker.event.EntityLivingUseItemEvent.Finish;
Наследование от интерфейсов событий
Link to наследование-от-интерфейсов-событий
LivingEntityUseItem Events implement the following interfaces and are able to call all of their methods/getters/setters as well:
Геттеры/сеттеры
Link to геттерысеттеры
The following information can be retrieved/set during the event:
ZenGetter | Возвращаемый тип |
---|---|
ZenGetter player | Возвращаемый тип IPlayer |
ZenGetter isPlayer | Возвращаемый тип bool |
ZenGetter item | Возвращаемый тип IItemStack |
ZenGetter duration | Возвращаемый тип int |
ZenSetter | Parameter Type |
---|---|
ZenSetter duration | Parameter Type int |