Package net.minecraft.world.item
Class DiggerItem
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<Item>
net.minecraft.world.item.Item
net.minecraft.world.item.TieredItem
net.minecraft.world.item.DiggerItem
- All Implemented Interfaces:
Vanishable,ItemLike,IForgeItem,IForgeRegistryEntry<Item>
- Direct Known Subclasses:
AxeItem,HoeItem,PickaxeItem,ShovelItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.PropertiesNested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatprivate final com.google.common.collect.Multimap<Attribute,AttributeModifier> protected final floatFields inherited from class net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, category, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZEFields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate -
Constructor Summary
ConstructorsConstructorDescriptionDiggerItem(float p_204108_, float p_204109_, Tier p_204110_, TagKey<Block> p_204111_, Item.Properties p_204112_) -
Method Summary
Modifier 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.TieredItem
getEnchantmentValue, getTier, isValidRepairItemMethods inherited from class net.minecraft.world.item.Item
allowdedIn, appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, fillItemCategory, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDrinkingSound, getEatingSound, getEquipSound, getFoodProperties, getId, getItemCategory, 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, shouldOverrideMultiplayerNbt, toString, use, useOn, useOnRelease, verifyTagAfterLoadMethods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getArmorTexture, getAttributeModifiers, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getItemEnchantability, getItemStackLimit, getMaxDamage, getShareTag, getSweepHitBox, getXpRepairRatio, hasContainerItem, hasCustomEntity, initCapabilities, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, 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:
getDestroySpeedin 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:
getDefaultAttributeModifiersin classItem
-
getAttackDamage
public float getAttackDamage() -
isCorrectToolForDrops
Deprecated.- Overrides:
isCorrectToolForDropsin classItem
-
isCorrectToolForDrops
Description copied from interface:IForgeItemItemStack sensitive version ofItem.isCorrectToolForDrops(BlockState)- Specified by:
isCorrectToolForDropsin interfaceIForgeItem- Parameters:
stack- The itemstack used to harvest the blockstate- The block trying to harvest- Returns:
- true if the stack can harvest the block
-