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.
Importare la Classe
Link to importare-la-classe
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.AnvilUpdateEvent;
Extending Event
Link to extending-event
AnvilUpdateEvent extends Event. That means all methods available in Event are also available in AnvilUpdateEvent
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter |
---|---|---|---|
Nome left | Tipo IItemStack | Ha Getter sì | Ha Setter no |
Nome levelCost | Tipo int | Ha Getter sì | Ha Setter sì |
Nome materialCosto | Tipo int | Ha Getter sì | Ha Setter sì |
Nome nome | Tipo string? | Ha Getter sì | Ha Setter no |
Nome output | Tipo IItemStack | Ha Getter sì | Ha Setter sì |
Nome player | Tipo Player? | Ha Getter sì | Ha Setter no |
Nome right | Tipo IItemStack | Ha Getter sì | Ha Setter no |