Class ItemTossEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.item.ItemEvent
net.minecraftforge.event.entity.item.ItemTossEvent
Event that is fired whenever a player tosses (Q) an item or drag-n-drops a
stack of items outside the inventory GUI screens. Canceling the event will
stop the items from entering the world, but will not prevent them being
removed from the inventory - and thus removed from the system.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
-
Constructor Summary
ConstructorDescriptionItemTossEvent
(ItemEntity entityItem, PlayerEntity player) Creates a new event for EntityItems tossed by a player. -
Method Summary
Methods inherited from class net.minecraftforge.event.entity.item.ItemEvent
getEntityItem
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
player
-
-
Constructor Details
-
ItemTossEvent
Creates a new event for EntityItems tossed by a player.- Parameters:
entityItem
- The EntityItem being tossed.player
- The player tossing the item.
-
-
Method Details
-
getPlayer
The player tossing the item.
-