Uses of Class
net.minecraftforge.common.ToolAction
Package
Description
-
Uses of ToolAction in net.minecraft.world.item
Modifier and TypeMethodDescriptionboolean
AxeItem.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) -
Uses of ToolAction in net.minecraftforge.common
Modifier and TypeFieldDescriptionstatic final ToolAction
ToolActions.AXE_DIG
Exposed by axes to allow querying tool behavioursstatic final ToolAction
ToolActions.AXE_SCRAPE
Passed ontoIForgeBlock.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.minecraftforge.common.ToolAction, boolean)
when an axe wants to scrape oxidization off copperstatic final ToolAction
ToolActions.AXE_STRIP
Passed ontoIForgeBlock.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.minecraftforge.common.ToolAction, boolean)
when an axe wants to strip a logstatic final ToolAction
ToolActions.AXE_WAX_OFF
Passed ontoIForgeBlock.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.minecraftforge.common.ToolAction, boolean)
when an axe wants to remove wax out of copperstatic final ToolAction
ToolActions.HOE_DIG
Exposed by hoes to allow querying tool behavioursstatic final ToolAction
ToolActions.HOE_TILL
Passed ontoIForgeBlock.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.minecraftforge.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 ontoIForgeBlock.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.minecraftforge.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 performedModifier and TypeFieldDescriptionprivate static final Map<String,
ToolAction> ToolAction.actions
static final Set<ToolAction>
ToolActions.DEFAULT_AXE_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
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.minecraftforge.common.data
Modifier and TypeMethodDescriptionprivate boolean
ForgeLootTableProvider.findAndReplaceInAlternative
(AlternativeLootItemCondition alternative, Item from, ToolAction toolAction) private boolean
ForgeLootTableProvider.findAndReplaceInLootEntry
(LootPoolEntryContainer entry, Item from, ToolAction toolAction) private boolean
ForgeLootTableProvider.findAndReplaceInLootPool
(LootPool lootPool, Item from, ToolAction toolAction) private boolean
ForgeLootTableProvider.findAndReplaceInLootTableBuilder
(LootTable.Builder builder, Item from, ToolAction toolAction) private boolean
ForgeLootTableProvider.findAndReplaceInParentedLootEntry
(CompositeEntryBase entry, Item from, ToolAction toolAction) -
Uses of ToolAction in net.minecraftforge.common.extensions
Modifier and TypeMethodDescriptiondefault boolean
IForgeItem.canPerformAction
(ItemStack stack, ToolAction toolAction) Queries if an item can perform the given action.default boolean
IForgeItemStack.canPerformAction
(ToolAction toolAction) Queries if an item can perform the given action.default BlockState
IForgeBlock.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 BlockState
IForgeBlock.getToolModifiedState
(BlockState state, Level level, BlockPos pos, Player player, ItemStack stack, ToolAction toolAction) Deprecated, for removal: This API element is subject to removal in a future version.default BlockState
IForgeBlockState.getToolModifiedState
(UseOnContext context, ToolAction toolAction, boolean simulate) Returns the state that this block should transform into when right-clicked by a tool.default BlockState
IForgeBlockState.getToolModifiedState
(Level level, BlockPos pos, Player player, ItemStack stack, ToolAction toolAction) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of ToolAction in net.minecraftforge.common.loot
Modifier and TypeMethodDescriptionstatic LootItemCondition.Builder
CanToolPerformAction.canToolPerformAction
(ToolAction action) -
Uses of ToolAction in net.minecraftforge.debug.item
Modifier and TypeMethodDescriptionboolean
CustomShieldTest.CustomShieldItem.canPerformAction
(ItemStack stack, ToolAction toolAction) -
Uses of ToolAction in net.minecraftforge.event
Modifier and TypeMethodDescriptionstatic BlockState
ForgeEventFactory.onToolUse
(BlockState originalState, UseOnContext context, ToolAction toolAction, boolean simulate) static BlockState
ForgeEventFactory.onToolUse
(BlockState originalState, Level level, BlockPos pos, Player player, ItemStack stack, ToolAction toolAction) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of ToolAction in net.minecraftforge.event.world
Modifier and TypeFieldDescriptionprivate final ToolAction
BlockEvent.BlockToolModificationEvent.toolAction
ModifierConstructorDescriptionBlockToolInteractEvent
(BlockState originalState, UseOnContext context, ToolAction toolAction) Deprecated, for removal: This API element is subject to removal in a future version.BlockToolInteractEvent
(LevelAccessor world, BlockPos pos, BlockState originalState, Player player, ItemStack stack, ToolAction toolAction) Deprecated, for removal: This API element is subject to removal in a future version.BlockToolModificationEvent
(BlockState originalState, UseOnContext context, ToolAction toolAction, boolean simulate) (package private)
BlockToolModificationEvent
(LevelAccessor level, BlockPos pos, BlockState originalState, ToolAction toolAction)
IForgeBlock.getToolModifiedState(BlockState, UseOnContext, ToolAction, boolean)
instead