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
-
public class ItemTossEvent extends ItemEvent
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
-
-
Field Summary
Fields Modifier and Type Field Description private PlayerEntity
player
-
Constructor Summary
Constructors Constructor Description ItemTossEvent(ItemEntity entityItem, PlayerEntity player)
Creates a new event for EntityItems tossed by a player.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlayerEntity
getPlayer()
The player tossing the item.-
Methods inherited from class net.minecraftforge.event.entity.item.ItemEvent
getEntityItem
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Field Detail
-
player
private final PlayerEntity player
-
-
Constructor Detail
-
ItemTossEvent
public ItemTossEvent(ItemEntity entityItem, PlayerEntity player)
Creates a new event for EntityItems tossed by a player.- Parameters:
entityItem
- The EntityItem being tossed.player
- The player tossing the item.
-
-
Method Detail
-
getPlayer
public PlayerEntity getPlayer()
The player tossing the item.
-
-