AnvilUpdateEvent

Link to anvilupdateevent

The event is not cancelable.

The event does not have a result.

Importing the class

Link to importing-the-class

Importing the class is recommended for events, simply add this line to the top of your script file.

ZenScript
Copy
import crafttweaker.forge.api.event.anvil.AnvilUpdateEvent;

Listening to the event

Link to listening-to-the-event

ZenScript
Copy
events.register<crafttweaker.forge.api.event.anvil.AnvilUpdateEvent>(event => {
    println("AnvilUpdateEvent ran!");
});

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

NameTypeHas GetterHas Setter
Name
cost
Type
int
Has Getter
true
Has Setter
true
Name
left
Type
IItemStack
Has Getter
true
Has Setter
false
Name
materialCost
Type
int
Has Getter
true
Has Setter
true
Name
name
Type
string?
Has Getter
true
Has Setter
false
Name
output
Type
IItemStack
Has Getter
true
Has Setter
true
Name
player
Type
Player
Has Getter
true
Has Setter
false
Name
right
Type
IItemStack
Has Getter
true
Has Setter
false