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 Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.Properties
-
Field Summary
Modifier and TypeFieldDescriptionprivate final float
private final com.google.common.collect.Multimap<Attribute,
AttributeModifier> protected final float
Fields inherited from class net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
ConstructorDescriptionDiggerItem
(float p_204108_, float p_204109_, Tier p_204110_, TagKey<Block> p_204111_, Item.Properties p_204112_) -
Method Summary
Modifier and TypeMethodDescriptionfloat
com.google.common.collect.Multimap<Attribute,
AttributeModifier> getDefaultAttributeModifiers
(EquipmentSlot p_40990_) float
getDestroySpeed
(ItemStack p_41004_, BlockState p_41005_) boolean
hurtEnemy
(ItemStack p_40994_, LivingEntity p_40995_, LivingEntity p_40996_) boolean
isCorrectToolForDrops
(ItemStack stack, BlockState state) ItemStack sensitive version ofItem.isCorrectToolForDrops(BlockState)
boolean
isCorrectToolForDrops
(BlockState p_150816_) Deprecated.boolean
mineBlock
(ItemStack p_40998_, Level p_40999_, BlockState p_41000_, BlockPos p_41001_, LivingEntity p_41002_) Methods inherited from class net.minecraft.world.item.TieredItem
getEnchantmentValue, getTier, isValidRepairItem
Methods inherited from class net.minecraft.world.item.Item
appendHoverText, 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, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, use, useOn, useOnRelease, verifyTagAfterLoad
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods inherited from interface net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, 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
-
speed
protected final float speed -
attackDamageBaseline
private final float attackDamageBaseline -
defaultModifiers
-
-
Constructor Details
-
DiggerItem
public DiggerItem(float p_204108_, float p_204109_, Tier p_204110_, TagKey<Block> p_204111_, Item.Properties p_204112_)
-
-
Method Details
-
getDestroySpeed
- Overrides:
getDestroySpeed
in classItem
-
hurtEnemy
-
mineBlock
public boolean mineBlock(ItemStack p_40998_, Level p_40999_, BlockState p_41000_, BlockPos p_41001_, LivingEntity p_41002_) -
getDefaultAttributeModifiers
public com.google.common.collect.Multimap<Attribute,AttributeModifier> getDefaultAttributeModifiers(EquipmentSlot p_40990_) - Overrides:
getDefaultAttributeModifiers
in classItem
-
getAttackDamage
public float getAttackDamage() -
isCorrectToolForDrops
Deprecated.- Overrides:
isCorrectToolForDrops
in classItem
-
isCorrectToolForDrops
Description copied from interface:IForgeItem
ItemStack sensitive version ofItem.isCorrectToolForDrops(BlockState)
- Specified by:
isCorrectToolForDrops
in interfaceIForgeItem
- Parameters:
stack
- The itemstack used to harvest the blockstate
- The block trying to harvest- Returns:
- true if the stack can harvest the block
-