Class ItemTossEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.item.ItemEvent
net.neoforged.neoforge.event.entity.item.ItemTossEvent
- All Implemented Interfaces:
 net.neoforged.bus.api.ICancellableEvent
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.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.SizeNested classes/interfaces inherited from class net.neoforged.bus.api.Event
net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result - 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionItemTossEvent(ItemEntity entityItem, Player player) Creates a new event for EntityItems tossed by a player. - 
Method Summary
Methods inherited from class net.neoforged.bus.api.Event
getResult, hasResult, setResultMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled 
- 
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. 
 -