BlockToolModificationEvent

Link to blocktoolmodificationevent

The event is not cancelable.

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
Copy
import crafttweaker.forge.api.event.block.BlockToolModificationEvent;

Extending BlockEvent

Link to extending-blockevent

BlockToolModificationEvent extends BlockEvent. That means all methods available in BlockEvent 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