Package net.neoforged.neoforge.common
Class ToolActions
java.lang.Object
net.neoforged.neoforge.common.ToolActions
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ToolAction
Exposed by axes to allow querying tool behavioursstatic final ToolAction
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ToolAction, boolean)
when an axe wants to scrape oxidization off copperstatic final ToolAction
static final ToolAction
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ToolAction, boolean)
when an axe wants to remove wax out of copperstatic final ToolAction
Exposed by brushes to allow querying tool behaviours for items that can brush Suspicious Blocks.static final Set
<ToolAction> static final Set
<ToolAction> static final Set
<ToolAction> static final Set
<ToolAction> static final Set
<ToolAction> static final Set
<ToolAction> static final Set
<ToolAction> static final Set
<ToolAction> static final Set
<ToolAction> static final Set
<ToolAction> static final ToolAction
This action corresponds to right-clicking the fishing rod to reel it in after earlier casting.static final ToolAction
Exposed by hoes to allow querying tool behavioursstatic final ToolAction
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ToolAction, boolean)
when a hoe wants to turn dirt into soilstatic final ToolAction
Exposed by pickaxes to allow querying tool behavioursstatic final ToolAction
This action is exposed by shears and corresponds to a carve action that is triggered with a right click on a block that supports such behaviour.static final ToolAction
Exposed by shears to allow querying tool behavioursstatic final ToolAction
This action is exposed by shears and corresponds to a disarm action that is triggered by breaking a block that supports such behaviour.static final ToolAction
This action is exposed by shears and corresponds to a harvest action that is triggered with a right click on a block that supports such behaviour.static final ToolAction
A tool action corresponding to the 'block' action of shields.static final ToolAction
Exposed by shovels to allow querying tool behavioursstatic final ToolAction
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ToolAction, boolean)
when a shovel wants to turn dirt into pathstatic final ToolAction
Exposed by swords to allow querying tool behavioursstatic final ToolAction
Used during player attack to figure out if a sweep attack should be performedstatic final ToolAction
Exposed by trident-like items to allow querying tool behaviours for items that can be thrown like Tridents. -
Constructor Summary
-
Method Summary
-
Field Details
-
AXE_DIG
Exposed by axes to allow querying tool behaviours -
PICKAXE_DIG
Exposed by pickaxes to allow querying tool behaviours -
SHOVEL_DIG
Exposed by shovels to allow querying tool behaviours -
HOE_DIG
Exposed by hoes to allow querying tool behaviours -
SWORD_DIG
Exposed by swords to allow querying tool behaviours -
SHEARS_DIG
Exposed by shears to allow querying tool behaviours -
AXE_STRIP
-
AXE_SCRAPE
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ToolAction, boolean)
when an axe wants to scrape oxidization off copper -
AXE_WAX_OFF
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ToolAction, boolean)
when an axe wants to remove wax out of copper -
SHOVEL_FLATTEN
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ToolAction, boolean)
when a shovel wants to turn dirt into path -
SWORD_SWEEP
Used during player attack to figure out if a sweep attack should be performed- See Also:
-
SHEARS_HARVEST
This action is exposed by shears and corresponds to a harvest action that is triggered with a right click on a block that supports such behaviour. Example: Right click with shears on a beehive with honey level 5 to harvest it -
SHEARS_CARVE
This action is exposed by shears and corresponds to a carve action that is triggered with a right click on a block that supports such behaviour. Example: Right click with shears o a pumpkin to carve it -
SHEARS_DISARM
This action is exposed by shears and corresponds to a disarm action that is triggered by breaking a block that supports such behaviour. Example: Breaking a trip wire with shears to disarm it. -
HOE_TILL
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ToolAction, boolean)
when a hoe wants to turn dirt into soil -
SHIELD_BLOCK
A tool action corresponding to the 'block' action of shields. Items should expose this tool action in order to enable damage blocking when the item is being "used". -
FISHING_ROD_CAST
This action corresponds to right-clicking the fishing rod to reel it in after earlier casting. Needed for modded fishing rods so that the FishingHook entity can properly function. -
TRIDENT_THROW
Exposed by trident-like items to allow querying tool behaviours for items that can be thrown like Tridents. -
BRUSH_BRUSH
Exposed by brushes to allow querying tool behaviours for items that can brush Suspicious Blocks. -
DEFAULT_AXE_ACTIONS
-
DEFAULT_HOE_ACTIONS
-
DEFAULT_SHOVEL_ACTIONS
-
DEFAULT_PICKAXE_ACTIONS
-
DEFAULT_SWORD_ACTIONS
-
DEFAULT_SHEARS_ACTIONS
-
DEFAULT_SHIELD_ACTIONS
-
DEFAULT_FISHING_ROD_ACTIONS
-
DEFAULT_TRIDENT_ACTIONS
-
DEFAULT_BRUSH_ACTIONS
-
-
Constructor Details
-
ToolActions
public ToolActions()
-
-
Method Details
-
of
-