Uses of Class
net.minecraft.world.item.context.UseOnContext
Packages that use UseOnContext
Package
Description
-
Uses of UseOnContext in net.minecraft.world.item
Fields in net.minecraft.world.item with type parameters of type UseOnContextModifier and TypeFieldDescriptionprotected static final Map
<Block, com.mojang.datafixers.util.Pair<Predicate<UseOnContext>, Consumer<UseOnContext>>> HoeItem.TILLABLES
Deprecated.Forge: This map is patched out of vanilla code.protected static final Map
<Block, com.mojang.datafixers.util.Pair<Predicate<UseOnContext>, Consumer<UseOnContext>>> HoeItem.TILLABLES
Deprecated.Forge: This map is patched out of vanilla code.Methods in net.minecraft.world.item that return types with arguments of type UseOnContextModifier and TypeMethodDescriptionstatic Consumer
<UseOnContext> HoeItem.changeIntoState
(BlockState pState) static Consumer
<UseOnContext> HoeItem.changeIntoStateAndDropItem
(BlockState pState, ItemLike pItemToDrop) Methods in net.minecraft.world.item with parameters of type UseOnContextModifier and TypeMethodDescriptionprivate Optional
<BlockState> AxeItem.evaluateNewBlockState
(Level pLevel, BlockPos pPos, Player pPlayer, BlockState pState, UseOnContext p_40529_) private InteractionResult
ItemStack.onItemUse
(UseOnContext p_41662_, Function<UseOnContext, InteractionResult> callback) ItemStack.onItemUseFirst
(UseOnContext p_41662_) static boolean
HoeItem.onlyIfAirAbove
(UseOnContext p_150857_) private static boolean
AxeItem.playerHasShieldUseIntent
(UseOnContext pContext) ArmorStandItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockAxeItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockBlockItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockBoneMealItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockBrushItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockCompassItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockDebugStickItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockEndCrystalItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockEnderEyeItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockFireChargeItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockFireworkRocketItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockFlintAndSteelItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockHangingEntityItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockHoeItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockHoneycombItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockItemStack.useOn
(UseOnContext pContext) LeadItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockMapItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockMinecartItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockPlaceOnWaterBlockItem.useOn
(UseOnContext p_220229_) PotionItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockShearsItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockShovelItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockSolidBucketItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockSpawnEggItem.useOn
(UseOnContext pContext) Called when this item is used when targeting a BlockMethod parameters in net.minecraft.world.item with type arguments of type UseOnContextModifier and TypeMethodDescriptionprivate InteractionResult
ItemStack.onItemUse
(UseOnContext p_41662_, Function<UseOnContext, InteractionResult> callback) -
Uses of UseOnContext in net.minecraft.world.item.context
Subclasses of UseOnContext in net.minecraft.world.item.contextConstructors in net.minecraft.world.item.context with parameters of type UseOnContext -
Uses of UseOnContext in net.neoforged.neoforge.common
Methods in net.neoforged.neoforge.common that return UseOnContextModifier and TypeMethodDescriptionstatic UseOnContext
CommonHooks.dispenseUseOnContext
(BlockSource source, ItemStack stack) Creates aUseOnContext
fordispense behavior
.Methods in net.neoforged.neoforge.common with parameters of type UseOnContextModifier and TypeMethodDescriptionstatic InteractionResult
CommonHooks.onPlaceItemIntoWorld
(UseOnContext context) -
Uses of UseOnContext in net.neoforged.neoforge.common.extensions
Methods in net.neoforged.neoforge.common.extensions with parameters of type UseOnContextModifier and TypeMethodDescriptiondefault @Nullable BlockState
IBlockExtension.getToolModifiedState
(BlockState state, UseOnContext context, ItemAbility itemAbility, boolean simulate) Returns the state that this block should transform into when right-clicked by a tool.default @Nullable BlockState
IBlockStateExtension.getToolModifiedState
(UseOnContext context, ItemAbility itemAbility, boolean simulate) Returns the state that this block should transform into when right-clicked by a tool.default InteractionResult
IItemExtension.onItemUseFirst
(ItemStack stack, UseOnContext context) This is called when the item is used, before the block is activated.default InteractionResult
IItemStackExtension.onItemUseFirst
(UseOnContext context) -
Uses of UseOnContext in net.neoforged.neoforge.event
Methods in net.neoforged.neoforge.event with parameters of type UseOnContextModifier and TypeMethodDescriptionstatic @Nullable BlockState
EventHooks.onToolUse
(BlockState originalState, UseOnContext context, ItemAbility itemAbility, boolean simulate) -
Uses of UseOnContext in net.neoforged.neoforge.event.entity.player
Fields in net.neoforged.neoforge.event.entity.player declared as UseOnContextMethods in net.neoforged.neoforge.event.entity.player that return UseOnContextConstructors in net.neoforged.neoforge.event.entity.player with parameters of type UseOnContextModifierConstructorDescriptionUseItemOnBlockEvent
(UseOnContext context, UseItemOnBlockEvent.UsePhase usePhase) -
Uses of UseOnContext in net.neoforged.neoforge.event.level
Fields in net.neoforged.neoforge.event.level declared as UseOnContextModifier and TypeFieldDescriptionprivate final UseOnContext
BlockEvent.BlockToolModificationEvent.context
Methods in net.neoforged.neoforge.event.level that return UseOnContextModifier and TypeMethodDescriptionBlockEvent.BlockToolModificationEvent.getContext()
Returns the nonnull use on context that this event was performed in.Constructors in net.neoforged.neoforge.event.level with parameters of type UseOnContextModifierConstructorDescriptionBlockToolModificationEvent
(BlockState originalState, UseOnContext context, ItemAbility itemAbility, boolean simulate)