类 GrindstoneEvent.OnPlaceItem
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.GrindstoneEvent
net.minecraftforge.event.GrindstoneEvent.OnPlaceItem
- 封闭类:
GrindstoneEvent
This event is
The following rules apply:
Cancelable
GrindstoneEvent.OnPlaceItem
is fired when the inputs to a grindstone are changed. The following rules apply:
- If the event is canceled, vanilla behavior will not run, and the output will be empty.
- If the event is not canceled
- and the output is empty, the output will be determined by vanilla.
- and the output is not empty, the output will be set, without running vanilla behavior.
- Vanilla XP calculation logic will be used unless all of the following criterias are met:
- the amount of experience is greater than or equal to
0
; - the event is not canceled;
- the output is not empty.
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraftforge.event.GrindstoneEvent
GrindstoneEvent.OnPlaceItem, GrindstoneEvent.OnTakeItem
从类继承的嵌套类/接口 net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
从类继承的方法 net.minecraftforge.event.GrindstoneEvent
getBottomItem, getTopItem, getXp, setXp
从类继承的方法 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
字段详细资料
-
output
-
-
构造器详细资料
-
OnPlaceItem
-
-
方法详细资料
-
getOutput
This is the output as determined by the event, not by the vanilla behavior between these two items.
If you are the first receiver of this event, it is guaranteed to be empty.
It will only be non-empty if changed by an event handler.
If this event is cancelled, this output stack is discarded.- 返回:
- The item to set in the output grindstone slot.
-
setOutput
Sets the output slot to a specific itemstack.- 参数:
output
- The stack to change the output to.
-