Class ItemEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.item.ItemEvent
Direct Known Subclasses:
ItemExpireEvent, ItemTossEvent

public class ItemEvent extends EntityEvent
Base class for all EntityItem events. Contains a reference to the EntityItem of interest. For most EntityItem events, there's little to no additional useful data from the firing method that isn't already contained within the EntityItem instance.
  • Field Details

    • entityItem

      private final ItemEntity entityItem
  • Constructor Details

    • ItemEvent

      public ItemEvent(ItemEntity itemEntity)
      Creates a new event for an EntityItem.
      Parameters:
      itemEntity - The EntityItem for this event
  • Method Details

    • getEntityItem

      public ItemEntity getEntityItem()
      The relevant EntityItem for this event, already cast for you.