Package net.neoforged.neoforge.common
Class ItemAbilities
java.lang.Object
net.neoforged.neoforge.common.ItemAbilities
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ItemAbility
Exposed by axes to allow querying tool behavioursstatic final ItemAbility
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ItemAbility, boolean)
when an axe wants to scrape oxidization off copperstatic final ItemAbility
static final ItemAbility
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ItemAbility, boolean)
when an axe wants to remove wax out of copperstatic final ItemAbility
Exposed by brushes to allow querying tool behaviours for items that can brush Suspicious Blocks.static final Set
<ItemAbility> static final Set
<ItemAbility> static final Set
<ItemAbility> static final Set
<ItemAbility> static final Set
<ItemAbility> static final Set
<ItemAbility> static final Set
<ItemAbility> static final Set
<ItemAbility> static final Set
<ItemAbility> static final Set
<ItemAbility> static final Set
<ItemAbility> static final Set
<ItemAbility> static final ItemAbility
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ItemAbility, boolean)
when flint and steel or fire charge want to light a campfire/candle/cake.static final ItemAbility
This action corresponds to right-clicking the fishing rod to reel it in after earlier casting.static final ItemAbility
Exposed by hoes to allow querying tool behavioursstatic final ItemAbility
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ItemAbility, boolean)
when a hoe wants to turn dirt into soilstatic final ItemAbility
Exposed by pickaxes to allow querying tool behavioursstatic final ItemAbility
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 ItemAbility
Exposed by shears to allow querying tool behavioursstatic final ItemAbility
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 ItemAbility
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 ItemAbility
This action is exposed by shears and corresponds to a harvest action that is triggered with a right click on armored wolves.static final ItemAbility
This action is exposed by shears and corresponds to a trim action that is triggered with a right click on a block that supports such behavior.static final ItemAbility
An item ability corresponding to the 'block' action of shields.static final ItemAbility
Exposed by shovels to allow querying tool behavioursstatic final ItemAbility
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ItemAbility, boolean)
when a shovel wants to douse a campfirestatic final ItemAbility
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ItemAbility, boolean)
when a shovel wants to turn dirt into pathstatic final ItemAbility
Exposed by swords to allow querying tool behavioursstatic final ItemAbility
Used during player attack to figure out if a sweep attack should be performedstatic final ItemAbility
Exposed by trident-like items to allow querying tool behaviours for items that can be thrown like Tridents. -
Constructor Summary
Constructors -
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.ItemAbility, 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.ItemAbility, 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.ItemAbility, boolean)
when a shovel wants to turn dirt into path -
SHOVEL_DOUSE
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ItemAbility, boolean)
when a shovel wants to douse a campfire -
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.- See Also:
-
SHEARS_REMOVE_ARMOR
This action is exposed by shears and corresponds to a harvest action that is triggered with a right click on armored wolves. -
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 on 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. -
SHEARS_TRIM
This action is exposed by shears and corresponds to a trim action that is triggered with a right click on a block that supports such behavior. Example: Right click with shears on agrowing plant
to stop it from growing. -
HOE_TILL
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ItemAbility, boolean)
when a hoe wants to turn dirt into soil -
SHIELD_BLOCK
An item ability corresponding to the 'block' action of shields. Items should expose this item ability 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. -
FIRESTARTER_LIGHT
Passed ontoIBlockExtension.getToolModifiedState(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.item.context.UseOnContext, net.neoforged.neoforge.common.ItemAbility, boolean)
when flint and steel or fire charge want to light a campfire/candle/cake. Note that dispensers with flint and steel will also use this but will have no player. -
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
-
DEFAULT_FLINT_ACTIONS
-
DEFAULT_FIRECHARGE_ACTIONS
-
-
Constructor Details
-
ItemAbilities
public ItemAbilities()
-
-
Method Details
-
of
-