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.Properties
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
Field Summary
Modifier and TypeFieldDescriptionprivate float
private com.google.common.collect.Multimap<Attribute,AttributeModifier>
protected float
Fields 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_SIZE
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
Constructor Summary
ConstructorDescriptionDiggerItem(float p_150810_, float p_150811_, Tier p_150812_, Tag<Block> p_150813_, Item.Properties p_150814_)
-
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
allowdedIn, appendHoverText, asItem, 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, getTags, 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, verifyTagAfterLoad
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canPerformAction, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getArmorTexture, getAttributeModifiers, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getHighlightTip, getItemEnchantability, getItemStackLimit, getMaxDamage, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getSweepHitBox, getXpRepairRatio, hasContainerItem, hasCustomEntity, initCapabilities, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isPiglinCurrency, isShield, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, showDurabilityBar
-
Field Details
-
blocks
-
speed
protected final float speed -
attackDamageBaseline
private final float attackDamageBaseline -
defaultModifiers
-
-
Constructor Details
-
DiggerItem
public DiggerItem(float p_150810_, float p_150811_, Tier p_150812_, Tag<Block> p_150813_, Item.Properties p_150814_)
-
-
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
-