BlockToolModificationEvent

Link to blocktoolmodificationevent

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.neoforge.api.event.block.BlockToolModificationEvent;

Listening to the event

Link to listening-to-the-event

ZenScript
Copy
events.register<crafttweaker.neoforge.api.event.block.BlockToolModificationEvent>(event => {
    println("BlockToolModificationEvent ran!");
});

BlockToolModificationEvent extends BlockEvent. That means all methods available in BlockEvent are also available in BlockToolModificationEvent

Implemented Interfaces

Link to implemented-interfaces

BlockToolModificationEvent implements the following interfaces. That means all methods defined in these interfaces are also available in BlockToolModificationEvent

NameTypeHas GetterHas SetterDescription
Name
context
Type
UseOnContext
Has Getter
true
Has Setter
false
Description
Name
finalState
Type
BlockToolModificationEvent
Has Getter
true
Has Setter
true
Description
Sets the transformed state after tool use.
If not set, will return the original state.
This will be bypassed if canceled, returning null instead.
Name
heldItemStack
Type
IItemStack
Has Getter
true
Has Setter
false
Description
Name
isSimulated
Type
boolean
Has Getter
true
Has Setter
false
Description
Name
player
Type
Player
Has Getter
true
Has Setter
false
Description
Name
toolAction
Type
ToolAction
Has Getter
true
Has Setter
false
Description