Package net.minecraftforge.event
Class GrindstoneEvent.OnTakeItem
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.GrindstoneEvent
net.minecraftforge.event.GrindstoneEvent.OnTakeItem
- Enclosing class:
- GrindstoneEvent
This event is
The event is called from
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.
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.event.GrindstoneEvent
GrindstoneEvent.OnPlaceItem, GrindstoneEvent.OnTakeItemNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the item in that will be in the bottom input grindstone slot after the event.Returns the item in that will be in the top input grindstone slot after the event..intgetXp()Returns the experience amount given to the player, will be the value from vanilla calculations unless modified by the event.voidsetNewBottomItem(ItemStack newBottom) Sets the itemstack in the bottom slot.voidsetNewTopItem(ItemStack newTop) Sets the itemstack in the top slot.Methods inherited from class net.minecraftforge.event.GrindstoneEvent
getBottomItem, getTopItem, setXpMethods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
newTop
-
newBottom
-
-
Constructor Details
-
OnTakeItem
-
-
Method Details
-
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
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
Sets the itemstack in the top slot. -
setNewBottomItem
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:
getXpin classGrindstoneEvent- Returns:
- the experience amount given to the player, will be the value from vanilla calculations unless modified by the event
-