MCAnvilUpdateEvent
Link to mcanvilupdateevent
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.
Importing the class
Link to importing-the-class
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 Copyimport crafttweaker.api.event.MCAnvilUpdateEvent;
Extending MCEvent
Link to extending-mcevent
MCAnvilUpdateEvent extends MCEvent. That means all methods available in MCEvent are also available in MCAnvilUpdateEvent
Properties
Link to properties
이름 | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
이름 left | Type IItemStack | Has Getter true | Has Setter false | Description No Description Provided |
이름 levelCost | Type int | Has Getter true | Has Setter true | Description No Description Provided |
이름 materialCost | Type int | Has Getter true | Has Setter true | Description No Description Provided |
이름 name | Type string? | Has Getter true | Has Setter false | Description No Description Provided |
이름 output | Type IItemStack | Has Getter true | Has Setter true | Description No Description Provided |
이름 player | Type MCPlayerEntity? | Has Getter true | Has Setter false | Description No Description Provided |
이름 right | Type IItemStack | Has Getter true | Has Setter false | Description No Description Provided |