Uses of Class
net.neoforged.neoforge.common.ToolAction
Package
Description
Classes for NeoForge's own data generation.
-
Uses of ToolAction in net.minecraft.world.item
Modifier and TypeMethodDescriptionboolean
AxeItem.canPerformAction
(ItemStack stack, ToolAction toolAction) boolean
BrushItem.canPerformAction
(ItemStack stack, ToolAction toolAction) boolean
FishingRodItem.canPerformAction
(ItemStack stack, ToolAction toolAction) boolean
HoeItem.canPerformAction
(ItemStack stack, ToolAction toolAction) boolean
PickaxeItem.canPerformAction
(ItemStack stack, ToolAction toolAction) boolean
ShearsItem.canPerformAction
(ItemStack stack, ToolAction toolAction) boolean
ShieldItem.canPerformAction
(ItemStack stack, ToolAction toolAction) boolean
ShovelItem.canPerformAction
(ItemStack stack, ToolAction toolAction) boolean
SwordItem.canPerformAction
(ItemStack stack, ToolAction toolAction) boolean
TridentItem.canPerformAction
(ItemStack stack, ToolAction toolAction) -
Uses of ToolAction in net.neoforged.neoforge.common
Modifier and TypeFieldDescriptionstatic final ToolAction
ToolActions.AXE_DIG
Exposed by axes to allow querying tool behavioursstatic final ToolAction
ToolActions.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 copperstatic final ToolAction
ToolActions.AXE_STRIP
static final ToolAction
ToolActions.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 copperstatic final ToolAction
ToolActions.BRUSH_BRUSH
Exposed by brushes to allow querying tool behaviours for items that can brush Suspicious Blocks.static final ToolAction
ToolActions.FISHING_ROD_CAST
This action corresponds to right-clicking the fishing rod to reel it in after earlier casting.static final ToolAction
ToolActions.HOE_DIG
Exposed by hoes to allow querying tool behavioursstatic final ToolAction
ToolActions.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 soilstatic final ToolAction
ToolActions.PICKAXE_DIG
Exposed by pickaxes to allow querying tool behavioursstatic final ToolAction
ToolActions.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.static final ToolAction
ToolActions.SHEARS_DIG
Exposed by shears to allow querying tool behavioursstatic final ToolAction
ToolActions.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.static final ToolAction
ToolActions.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.static final ToolAction
ToolActions.SHIELD_BLOCK
A tool action corresponding to the 'block' action of shields.static final ToolAction
ToolActions.SHOVEL_DIG
Exposed by shovels to allow querying tool behavioursstatic final ToolAction
ToolActions.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 pathstatic final ToolAction
ToolActions.SWORD_DIG
Exposed by swords to allow querying tool behavioursstatic final ToolAction
ToolActions.SWORD_SWEEP
Used during player attack to figure out if a sweep attack should be performedstatic final ToolAction
ToolActions.TRIDENT_THROW
Exposed by trident-like items to allow querying tool behaviours for items that can be thrown like Tridents.Modifier and TypeFieldDescriptionprivate static final Map
<String, ToolAction> ToolAction.actions
static com.mojang.serialization.Codec
<ToolAction> ToolAction.CODEC
static final Set
<ToolAction> ToolActions.DEFAULT_AXE_ACTIONS
static final Set
<ToolAction> ToolActions.DEFAULT_BRUSH_ACTIONS
static final Set
<ToolAction> ToolActions.DEFAULT_FISHING_ROD_ACTIONS
static final Set
<ToolAction> ToolActions.DEFAULT_HOE_ACTIONS
static final Set
<ToolAction> ToolActions.DEFAULT_PICKAXE_ACTIONS
static final Set
<ToolAction> ToolActions.DEFAULT_SHEARS_ACTIONS
static final Set
<ToolAction> ToolActions.DEFAULT_SHIELD_ACTIONS
static final Set
<ToolAction> ToolActions.DEFAULT_SHOVEL_ACTIONS
static final Set
<ToolAction> ToolActions.DEFAULT_SWORD_ACTIONS
static final Set
<ToolAction> ToolActions.DEFAULT_TRIDENT_ACTIONS
Modifier and TypeMethodDescriptionstatic ToolAction
Gets or creates a new ToolAction for the given name.Modifier and TypeMethodDescriptionstatic Collection
<ToolAction> ToolAction.getActions()
Returns all registered actions.private static Set
<ToolAction> ToolActions.of
(ToolAction... actions) Modifier and TypeMethodDescriptionprivate static Set
<ToolAction> ToolActions.of
(ToolAction... actions) -
Uses of ToolAction in net.neoforged.neoforge.common.advancements.critereon
Modifier and TypeFieldDescriptionprivate final ToolAction
ToolActionItemPredicate.action
The field for theaction
record component.Modifier and TypeMethodDescriptionToolActionItemPredicate.action()
Returns the value of theaction
record component.ModifierConstructorDescriptionToolActionItemPredicate
(ToolAction action) Creates an instance of aToolActionItemPredicate
record class. -
Uses of ToolAction in net.neoforged.neoforge.common.data.internal
Modifier and TypeMethodDescriptionprivate static BiFunction
<Criterion<?>, HolderLookup.Provider, Criterion<?>> NeoForgeAdvancementProvider.replaceMatchToolCriteria
(ToolAction toolAction, ItemLike... targetItem) -
Uses of ToolAction in net.neoforged.neoforge.common.extensions
Modifier and TypeMethodDescriptiondefault boolean
IItemExtension.canPerformAction
(ItemStack stack, ToolAction toolAction) Queries if an item can perform the given action.default boolean
IItemStackExtension.canPerformAction
(ToolAction toolAction) Queries if an item can perform the given action.default @Nullable BlockState
IBlockExtension.getToolModifiedState
(BlockState state, UseOnContext context, ToolAction toolAction, boolean simulate) Returns the state that this block should transform into when right-clicked by a tool.default @Nullable BlockState
IBlockStateExtension.getToolModifiedState
(UseOnContext context, ToolAction toolAction, boolean simulate) Returns the state that this block should transform into when right-clicked by a tool. -
Uses of ToolAction in net.neoforged.neoforge.common.loot
Modifier and TypeMethodDescriptionstatic LootItemCondition.Builder
CanToolPerformAction.canToolPerformAction
(ToolAction action) -
Uses of ToolAction in net.neoforged.neoforge.event
Modifier and TypeMethodDescriptionstatic @Nullable BlockState
EventHooks.onToolUse
(BlockState originalState, UseOnContext context, ToolAction toolAction, boolean simulate) -
Uses of ToolAction in net.neoforged.neoforge.event.level
Modifier and TypeFieldDescriptionprivate final ToolAction
BlockEvent.BlockToolModificationEvent.toolAction
ModifierConstructorDescriptionBlockToolModificationEvent
(BlockState originalState, UseOnContext context, ToolAction toolAction, boolean simulate) -
Uses of ToolAction in net.neoforged.neoforge.oldtest.item
Modifier and TypeMethodDescriptionboolean
CustomShieldTest.CustomShieldItem.canPerformAction
(ItemStack stack, ToolAction toolAction)