public interface UseItemStackEvent extends Event
ItemStack is used.| Modifier and Type | Interface and Description |
|---|---|
static interface |
UseItemStackEvent.Finish
Fired when an item is finished 'normally', e.g.
|
static interface |
UseItemStackEvent.Replace
Called after
UseItemStackEvent.Finish, when the item in the entity's
hand is replaced. |
static interface |
UseItemStackEvent.Reset
Called before an entity's used item state is reset.
|
static interface |
UseItemStackEvent.Start
Called before
UseItemStackEvent.Tick when a player starts using an
ItemType, typically when they hold right mouse. |
static interface |
UseItemStackEvent.Stop
Called after
UseItemStackEvent.Tick when an ItemType has finished being
used. |
static interface |
UseItemStackEvent.Tick
Called after
UseItemStackEvent.Start during each tick as an
ItemType is being used. |
| Modifier and Type | Method and Description |
|---|---|
ItemStackSnapshot |
getItemStackInUse()
Gets the
ItemStack being consumed. |
int |
getOriginalRemainingDuration()
Gets the original remaining duration of
ItemStack in use. |
int |
getRemainingDuration()
Gets the remaining duration of
ItemStack in use. |
void |
setRemainingDuration(int duration)
Sets the remaining duration of
ItemStack in use. |
getCause, getContext, getSourceint getOriginalRemainingDuration()
ItemStack in use.int getRemainingDuration()
ItemStack in use.void setRemainingDuration(int duration)
ItemStack in use.duration - The remaining duration to setItemStackSnapshot getItemStackInUse()
ItemStack being consumed.