Package net.minecraft.world.item
Class HoeItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.TieredItem
net.minecraft.world.item.DiggerItem
net.minecraft.world.item.HoeItem
- All Implemented Interfaces:
FeatureElement,ItemLike,IItemExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.Properties, Item.TooltipContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Map<Block, com.mojang.datafixers.util.Pair<Predicate<UseOnContext>, Consumer<UseOnContext>>> Deprecated.Forge: This map is patched out of vanilla code.Fields inherited from class net.minecraft.world.item.Item
ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, DEFAULT_MAX_STACK_SIZE, MAX_BAR_WIDTHFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPerformAction(ItemStack stack, ToolAction toolAction) Queries if an item can perform the given action.static Consumer<UseOnContext> changeIntoState(BlockState p_150859_) static Consumer<UseOnContext> changeIntoStateAndDropItem(BlockState p_150850_, ItemLike p_150851_) static booleanonlyIfAirAbove(UseOnContext p_150857_) useOn(UseOnContext p_41341_) Methods inherited from class net.minecraft.world.item.DiggerItem
createAttributes, hurtEnemyMethods inherited from class net.minecraft.world.item.TieredItem
getEnchantmentValue, getTier, isValidRepairItemMethods inherited from class net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canFitInsideContainerItems, components, finishUsingItem, getAttackDamageBonus, getBarColor, getBarWidth, getBreakingSound, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDefaultMaxStackSize, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, isRepairable, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, toString, use, useOnRelease, verifyComponentsAfterLoadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IItemExtension
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onAnimalArmorTick, onArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
Field Details
-
TILLABLES
@Deprecated protected static final Map<Block,com.mojang.datafixers.util.Pair<Predicate<UseOnContext>, TILLABLESConsumer<UseOnContext>>> Deprecated.Forge: This map is patched out of vanilla code. Listen toBlockEvent.BlockToolModificationEventor overrideIBlockExtension.getToolModifiedState(BlockState, UseOnContext, net.neoforged.neoforge.common.ToolAction, boolean).
-
-
Constructor Details
-
HoeItem
-
-
Method Details
-
useOn
-
changeIntoState
-
changeIntoStateAndDropItem
public static Consumer<UseOnContext> changeIntoStateAndDropItem(BlockState p_150850_, ItemLike p_150851_) -
onlyIfAirAbove
-
canPerformAction
Description copied from interface:IItemExtensionQueries if an item can perform the given action. SeeToolActionsfor a description of each stock action- Parameters:
stack- The stack being usedtoolAction- The action being queried- Returns:
- True if the stack can perform the action
-