Class GrindstoneEvent.OnTakeItem

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.GrindstoneEvent
net.minecraftforge.event.GrindstoneEvent.OnTakeItem
Enclosing class:
GrindstoneEvent

public static class GrindstoneEvent.OnTakeItem extends GrindstoneEvent
This event is Cancelable.
GrindstoneEvent.OnTakeItem is fired when the output of a grindstone is taken.
The event is called from GrindstoneMenu(int, Inventory).
If the event is canceled, vanilla behavior will not run, and no inputs will be consumed.
If the amount of experience is larger than or equal to 0, the vanilla behavior for calculating experience will not be used.
  • Field Details

  • Constructor Details

  • Method Details

    • getNewTopItem

      public ItemStack getNewTopItem()
      Returns the item in that will be in the top input grindstone slot after the event..
      Returns:
      the item in that will be in the top input grindstone slot after the event.
    • getNewBottomItem

      public ItemStack getNewBottomItem()
      Returns the item in that will be in the bottom input grindstone slot after the event.
      Returns:
      the item in that will be in the bottom input grindstone slot after the event
    • setNewTopItem

      public void setNewTopItem(ItemStack newTop)
      Sets the itemstack in the top slot.
    • setNewBottomItem

      public void setNewBottomItem(ItemStack newBottom)
      Sets the itemstack in the bottom slot.
    • getXp

      public int getXp()
      Returns the experience amount given to the player, will be the value from vanilla calculations unless modified by the event.
      Overrides:
      getXp in class GrindstoneEvent
      Returns:
      the experience amount given to the player, will be the value from vanilla calculations unless modified by the event