AnvilUpdateEvent

Link to anvilupdateevent

AnvilUpdateEvent is fired when the inputs (either input stack, or the name) of an anvil are changed. You can listen to this event to add custom anvil recipes.

The event is cancelable.

If the event is canceled, vanilla behavior will not run, and the output will be set to <item:minecraft:air>.

If the event is not canceled, but the output is not empty, it will set the output and not run vanilla behavior.

The event does not have a result.

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.event.AnvilUpdateEvent;

AnvilUpdateEvent extends Event. That means all methods available in Event are also available in AnvilUpdateEvent

名称类型可获得可设置描述
名称
left
类型
IItemStack
可获得
true
可设置
false
描述
No Description Provided
名称
levelCost
类型
int
可获得
true
可设置
true
描述
No Description Provided
名称
材料成本
类型
int
可获得
true
可设置
true
描述
No Description Provided
名称
name(名称)
类型
invalid
可获得
true
可设置
false
描述
No Description Provided
名称
output(输出)
类型
IItemStack
可获得
true
可设置
true
描述
No Description Provided
名称
player
类型
Player
可获得
true
可设置
false
描述
No Description Provided
名称
right
类型
IItemStack
可获得
true
可设置
false
描述
No Description Provided