public class MiningToolItem extends ToolItem implements Vanishable
Item.Settings
Modifier and Type | Field and Description |
---|---|
private float |
attackDamage |
private Multimap<EntityAttribute,EntityAttributeModifier> |
attributeModifiers |
private Set<Block> |
effectiveBlocks |
protected float |
miningSpeed |
ATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, group, RANDOM
Modifier | Constructor and Description |
---|---|
protected |
MiningToolItem(float attackDamage,
float attackSpeed,
ToolMaterial material,
Set<Block> effectiveBlocks,
Item.Settings settings) |
Modifier and Type | Method and Description |
---|---|
float |
getAttackDamage() |
Multimap<EntityAttribute,EntityAttributeModifier> |
getAttributeModifiers(EquipmentSlot slot) |
float |
getMiningSpeedMultiplier(ItemStack stack,
BlockState state) |
boolean |
postHit(ItemStack stack,
LivingEntity target,
LivingEntity attacker) |
boolean |
postMine(ItemStack stack,
World world,
BlockState state,
BlockPos pos,
LivingEntity miner) |
canRepair, getEnchantability, getMaterial
appendStacks, appendTooltip, asItem, byRawId, canMine, damage, finishUsing, fromBlock, getDefaultStack, getDrinkSound, getEatSound, getFoodComponent, getGroup, getMaxCount, getMaxDamage, getMaxUseTime, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getTranslationKey, getTranslationKey, getUseAction, hasGlint, hasRecipeRemainder, inventoryTick, isDamageable, isEffectiveOn, isEnchantable, isFireproof, isFood, isIn, isIn, isNetworkSynced, isUsedOnRelease, onCraft, onStoppedUsing, postProcessTag, raycast, shouldSyncTagToClient, toString, usageTick, use, useOnBlock, useOnEntity
protected final float miningSpeed
private final float attackDamage
private final Multimap<EntityAttribute,EntityAttributeModifier> attributeModifiers
protected MiningToolItem(float attackDamage, float attackSpeed, ToolMaterial material, Set<Block> effectiveBlocks, Item.Settings settings)
public float getMiningSpeedMultiplier(ItemStack stack, BlockState state)
getMiningSpeedMultiplier
in class Item
public boolean postHit(ItemStack stack, LivingEntity target, LivingEntity attacker)
public boolean postMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner)
public Multimap<EntityAttribute,EntityAttributeModifier> getAttributeModifiers(EquipmentSlot slot)
getAttributeModifiers
in class Item
public float getAttackDamage()