Uses of Class
net.neoforged.neoforge.common.ItemAbility
Packages that use ItemAbility
Package
Description
Classes for NeoForge's own data generation.
-
Uses of ItemAbility in net.neoforged.neoforge.common
Fields in net.neoforged.neoforge.common declared as ItemAbilityModifier and TypeFieldDescriptionstatic final ItemAbility
ItemAbilities.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 copperstatic final ItemAbility
ItemAbilities.AXE_STRIP
static final ItemAbility
ItemAbilities.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 copperstatic final ItemAbility
ItemAbilities.BRUSH_BRUSH
Exposed by brushes to allow querying tool behaviours for items that can brush Suspicious Blocks.static final ItemAbility
ItemAbilities.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.static final ItemAbility
ItemAbilities.FISHING_ROD_CAST
This action corresponds to right-clicking the fishing rod to reel it in after earlier casting.static final ItemAbility
ItemAbilities.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 soilstatic final ItemAbility
ItemAbilities.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 ItemAbility
ItemAbilities.SHEARS_DIG
Exposed by shears to allow querying tool behavioursstatic final ItemAbility
ItemAbilities.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 ItemAbility
ItemAbilities.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 ItemAbility
ItemAbilities.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.static final ItemAbility
ItemAbilities.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.static final ItemAbility
ItemAbilities.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 campfirestatic final ItemAbility
ItemAbilities.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 pathstatic final ItemAbility
ItemAbilities.SWORD_SWEEP
Used during player attack to figure out if a sweep attack should be performedstatic final ItemAbility
ItemAbilities.TRIDENT_THROW
Exposed by trident-like items to allow querying tool behaviours for items that can be thrown like Tridents.Fields in net.neoforged.neoforge.common with type parameters of type ItemAbilityModifier and TypeFieldDescriptionprivate static final Map
<String, ItemAbility> ItemAbility.actions
static com.mojang.serialization.Codec
<ItemAbility> ItemAbility.CODEC
static final Set
<ItemAbility> ItemAbilities.DEFAULT_AXE_ACTIONS
static final Set
<ItemAbility> ItemAbilities.DEFAULT_BRUSH_ACTIONS
static final Set
<ItemAbility> ItemAbilities.DEFAULT_FIRECHARGE_ACTIONS
static final Set
<ItemAbility> ItemAbilities.DEFAULT_FISHING_ROD_ACTIONS
static final Set
<ItemAbility> ItemAbilities.DEFAULT_FLINT_ACTIONS
static final Set
<ItemAbility> ItemAbilities.DEFAULT_HOE_ACTIONS
static final Set
<ItemAbility> ItemAbilities.DEFAULT_SHEARS_ACTIONS
static final Set
<ItemAbility> ItemAbilities.DEFAULT_SHOVEL_ACTIONS
static final Set
<ItemAbility> ItemAbilities.DEFAULT_TRIDENT_ACTIONS
static net.minecraft.network.codec.StreamCodec
<io.netty.buffer.ByteBuf, ItemAbility> ItemAbility.STREAM_CODEC
Methods in net.neoforged.neoforge.common that return ItemAbilityModifier and TypeMethodDescriptionstatic ItemAbility
Gets or creates a new ItemAbility for the given name.Methods in net.neoforged.neoforge.common that return types with arguments of type ItemAbilityModifier and TypeMethodDescriptionstatic Collection
<ItemAbility> ItemAbility.getActions()
Returns all registered actions.private static Set
<ItemAbility> ItemAbilities.of
(ItemAbility... actions) Methods in net.neoforged.neoforge.common with parameters of type ItemAbilityModifier and TypeMethodDescriptionprivate static Set
<ItemAbility> ItemAbilities.of
(ItemAbility... actions) -
Uses of ItemAbility in net.neoforged.neoforge.common.advancements.critereon
Fields in net.neoforged.neoforge.common.advancements.critereon declared as ItemAbilityModifier and TypeFieldDescriptionprivate final ItemAbility
ItemAbilityPredicate.action
The field for theaction
record component.Methods in net.neoforged.neoforge.common.advancements.critereon that return ItemAbilityModifier and TypeMethodDescriptionItemAbilityPredicate.action()
Returns the value of theaction
record component.Constructors in net.neoforged.neoforge.common.advancements.critereon with parameters of type ItemAbilityModifierConstructorDescriptionItemAbilityPredicate
(ItemAbility action) Creates an instance of aItemAbilityPredicate
record class. -
Uses of ItemAbility in net.neoforged.neoforge.common.data.internal
Methods in net.neoforged.neoforge.common.data.internal with parameters of type ItemAbilityModifier and TypeMethodDescriptionprivate static BiFunction
<net.minecraft.advancements.Criterion<?>, net.minecraft.core.HolderLookup.Provider, net.minecraft.advancements.Criterion<?>> NeoForgeAdvancementProvider.replaceMatchToolCriteria
(ItemAbility itemAbility, net.minecraft.world.level.ItemLike... targetItem) -
Uses of ItemAbility in net.neoforged.neoforge.common.extensions
Methods in net.neoforged.neoforge.common.extensions with parameters of type ItemAbilityModifier and TypeMethodDescriptiondefault boolean
IItemExtension.canPerformAction
(net.minecraft.world.item.ItemStack stack, ItemAbility itemAbility) Queries if an item can perform the given action.default boolean
IItemStackExtension.canPerformAction
(ItemAbility itemAbility) Queries if an item can perform the given action.default @Nullable net.minecraft.world.level.block.state.BlockState
IBlockExtension.getToolModifiedState
(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.UseOnContext context, ItemAbility itemAbility, boolean simulate) Returns the state that this block should transform into when right-clicked by a tool.default @Nullable net.minecraft.world.level.block.state.BlockState
IBlockStateExtension.getToolModifiedState
(net.minecraft.world.item.context.UseOnContext context, ItemAbility itemAbility, boolean simulate) Returns the state that this block should transform into when right-clicked by a tool. -
Uses of ItemAbility in net.neoforged.neoforge.common.loot
Fields in net.neoforged.neoforge.common.loot declared as ItemAbilityModifier and TypeFieldDescription(package private) final ItemAbility
CanItemPerformAbility.ability
Methods in net.neoforged.neoforge.common.loot with parameters of type ItemAbilityModifier and TypeMethodDescriptionstatic net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder
CanItemPerformAbility.canItemPerformAbility
(ItemAbility action) Constructors in net.neoforged.neoforge.common.loot with parameters of type ItemAbility -
Uses of ItemAbility in net.neoforged.neoforge.event
Methods in net.neoforged.neoforge.event with parameters of type ItemAbilityModifier and TypeMethodDescriptionstatic @Nullable net.minecraft.world.level.block.state.BlockState
EventHooks.onToolUse
(net.minecraft.world.level.block.state.BlockState originalState, net.minecraft.world.item.context.UseOnContext context, ItemAbility itemAbility, boolean simulate) -
Uses of ItemAbility in net.neoforged.neoforge.event.level
Fields in net.neoforged.neoforge.event.level declared as ItemAbilityModifier and TypeFieldDescriptionprivate final ItemAbility
BlockEvent.BlockToolModificationEvent.itemAbility
Methods in net.neoforged.neoforge.event.level that return ItemAbilityConstructors in net.neoforged.neoforge.event.level with parameters of type ItemAbilityModifierConstructorDescriptionBlockToolModificationEvent
(net.minecraft.world.level.block.state.BlockState originalState, net.minecraft.world.item.context.UseOnContext context, ItemAbility itemAbility, boolean simulate)