Package net.minecraft.item
Class MiningToolItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.ToolItem
net.minecraft.item.MiningToolItem
- All Implemented Interfaces:
ItemConvertible,Vanishable
- Direct Known Subclasses:
AxeItem,HoeItem,PickaxeItem,ShovelItem
public class MiningToolItem extends ToolItem implements Vanishable
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.Settings -
Field Summary
Fields Modifier and Type Field Description private floatattackDamageprivate Multimap<EntityAttribute,EntityAttributeModifier>attributeModifiersprivate Set<Block>effectiveBlocksprotected floatminingSpeedFields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, group -
Constructor Summary
Constructors Modifier Constructor Description protectedMiningToolItem(float attackDamage, float attackSpeed, ToolMaterial material, Set<Block> effectiveBlocks, Item.Settings settings) -
Method Summary
Modifier and Type Method Description floatgetAttackDamage()Multimap<EntityAttribute,EntityAttributeModifier>getAttributeModifiers(EquipmentSlot slot)floatgetMiningSpeedMultiplier(ItemStack stack, BlockState state)booleanpostHit(ItemStack stack, LivingEntity target, LivingEntity attacker)booleanpostMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner)Methods inherited from class net.minecraft.item.ToolItem
canRepair, getEnchantability, getMaterialMethods inherited from class net.minecraft.item.Item
appendStacks, appendTooltip, asItem, byRawId, canMine, damage, finishUsing, fromBlock, getDefaultStack, getDrinkSound, getEatSound, getEquipSound, getFoodComponent, getGroup, getItemBarColor, getItemBarStep, getMaxCount, getMaxDamage, getMaxUseTime, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getTooltipData, getTranslationKey, getTranslationKey, getUseAction, hasGlint, hasRecipeRemainder, hasStoredInventory, inventoryTick, isDamageable, isEnchantable, isFireproof, isFood, isIn, isItemBarVisible, isNetworkSynced, isSuitableFor, isUsedOnRelease, method_33261, onClicked, onCraft, onStackClicked, onStoppedUsing, postProcessTag, raycast, shouldSyncTagToClient, toString, usageTick, use, useOnBlock, useOnEntity
-
Field Details
-
effectiveBlocks
-
miningSpeed
protected final float miningSpeed -
attackDamage
private final float attackDamage -
attributeModifiers
-
-
Constructor Details
-
MiningToolItem
protected MiningToolItem(float attackDamage, float attackSpeed, ToolMaterial material, Set<Block> effectiveBlocks, Item.Settings settings)
-
-
Method Details
-
getMiningSpeedMultiplier
- Overrides:
getMiningSpeedMultiplierin classItem
-
postHit
-
postMine
public boolean postMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner) -
getAttributeModifiers
public Multimap<EntityAttribute,EntityAttributeModifier> getAttributeModifiers(EquipmentSlot slot)- Overrides:
getAttributeModifiersin classItem
-
getAttackDamage
public float getAttackDamage()
-