Package net.minecraft.world.item
Class DiggerItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.TieredItem
net.minecraft.world.item.DiggerItem
- All Implemented Interfaces:
- FeatureElement,- Vanishable,- ItemLike,- IForgeItem
- Direct Known Subclasses:
- AxeItem,- HoeItem,- PickaxeItem,- ShovelItem
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.world.item.ItemItem.Properties
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final floatprivate final com.google.common.collect.Multimap<Attribute,AttributeModifier> protected final floatFields inherited from class net.minecraft.world.item.ItemBASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZEFields inherited from interface net.minecraft.world.flag.FeatureElementFILTERED_REGISTRIES
- 
Constructor SummaryConstructorsConstructorDescriptionDiggerItem(float p_204108_, float p_204109_, Tier p_204110_, TagKey<Block> p_204111_, Item.Properties p_204112_) 
- 
Method SummaryModifier and TypeMethodDescriptionfloatcom.google.common.collect.Multimap<Attribute,AttributeModifier> getDefaultAttributeModifiers(EquipmentSlot p_40990_) floatgetDestroySpeed(ItemStack p_41004_, BlockState p_41005_) booleanhurtEnemy(ItemStack p_40994_, LivingEntity p_40995_, LivingEntity p_40996_) booleanisCorrectToolForDrops(ItemStack stack, BlockState state) ItemStack sensitive version ofItem.isCorrectToolForDrops(BlockState)booleanisCorrectToolForDrops(BlockState p_150816_) Deprecated.booleanmineBlock(ItemStack p_40998_, Level p_40999_, BlockState p_41000_, BlockPos p_41001_, LivingEntity p_41002_) Methods inherited from class net.minecraft.world.item.TieredItemgetEnchantmentValue, getTier, isValidRepairItemMethods inherited from class net.minecraft.world.item.ItemappendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDrinkingSound, getEatingSound, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, use, useOn, useOnRelease, verifyTagAfterLoadMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElementisEnabledMethods inherited from interface net.minecraftforge.common.extensions.IForgeItemcanApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onInventoryTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
- 
Field Details- 
blocks
- 
speedprotected final float speed
- 
attackDamageBaselineprivate final float attackDamageBaseline
- 
defaultModifiers
 
- 
- 
Constructor Details- 
DiggerItempublic DiggerItem(float p_204108_, float p_204109_, Tier p_204110_, TagKey<Block> p_204111_, Item.Properties p_204112_) 
 
- 
- 
Method Details- 
getDestroySpeed- Overrides:
- getDestroySpeedin class- Item
 
- 
hurtEnemy
- 
mineBlockpublic boolean mineBlock(ItemStack p_40998_, Level p_40999_, BlockState p_41000_, BlockPos p_41001_, LivingEntity p_41002_) 
- 
getDefaultAttributeModifierspublic com.google.common.collect.Multimap<Attribute,AttributeModifier> getDefaultAttributeModifiers(EquipmentSlot p_40990_) - Overrides:
- getDefaultAttributeModifiersin class- Item
 
- 
getAttackDamagepublic float getAttackDamage()
- 
isCorrectToolForDropsDeprecated.- Overrides:
- isCorrectToolForDropsin class- Item
 
- 
isCorrectToolForDropsDescription copied from interface:IForgeItemItemStack sensitive version ofItem.isCorrectToolForDrops(BlockState)- Specified by:
- isCorrectToolForDropsin interface- IForgeItem
- Parameters:
- stack- The itemstack used to harvest the block
- state- The block trying to harvest
- Returns:
- true if the stack can harvest the block
 
 
-