Package net.minecraftforge.event
Class GrindstoneEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.GrindstoneEvent
- Direct Known Subclasses:
GrindstoneEvent.OnPlaceItem
,GrindstoneEvent.OnTakeItem
public abstract class GrindstoneEvent
extends net.minecraftforge.eventbus.api.Event
Shared logic for the two events fired from grindstones.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
This event isCancelable
GrindstoneEvent.OnPlaceItem
is fired when the inputs to a grindstone are changed.static class
This event isCancelable
.
GrindstoneEvent.OnTakeItem
is fired when the output of a grindstone is taken.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
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
top
-
bottom
-
xp
private int xp
-
-
Constructor Details
-
GrindstoneEvent
-
-
Method Details
-
getTopItem
Returns the item in the top input grindstone slot.- Returns:
- the item in the top input grindstone slot
-
getBottomItem
Returns the item in the bottom input grindstone slot.- Returns:
- the item in the bottom input grindstone slot
-
getXp
public int getXp()Returns the experience amount given to the player. It will be-1
unlesssetXp(int)
is called.- Returns:
- the experience amount given to the player
-
setXp
public void setXp(int xp) Sets the experience amount.- Parameters:
xp
- The experience amount given to the player.
-