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
It 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 0, the vanilla behavior for calculating experience will not run.
Cancelable
GrindstoneEvent.OnTakeItem
is fired when the output in a grindstone are is taken. It 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 0, the vanilla behavior for calculating experience will not run.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.event.GrindstoneEvent
GrindstoneEvent.OnplaceItem, GrindstoneEvent.OnTakeItem
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getXp()
This is the experience amount that will be returned by the event.void
setNewBottomItem
(ItemStack newBottom) Sets the itemstack in the bottom slot.void
setNewTopItem
(ItemStack newTop) Sets the itemstack in the top slot.Methods inherited from class net.minecraftforge.event.GrindstoneEvent
getBottomItem, getTopItem, setXp
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
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.
-
getNewBottomItem
- Returns:
- The item in that will be in the bottom input grindstone slot after the event.
-
setNewTopItem
Sets the itemstack in the top slot.- Parameters:
newTop
-
-
setNewBottomItem
Sets the itemstack in the bottom slot.- Parameters:
newBottom
-
-
getXp
public int getXp()This is the experience amount that will be returned by the event.- Overrides:
getXp
in classGrindstoneEvent
- Returns:
- The experience amount given to the player.
-