Class ItemTossEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event

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.
  • Field Details

  • Constructor Details

    • 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 Details

    • getPlayer

      public PlayerEntity getPlayer()
      The player tossing the item.