public class SwordItem extends ToolItem implements Vanishable
Item.Settings| Modifier and Type | Field and Description |
|---|---|
private float |
attackDamage |
private Multimap<EntityAttribute,EntityAttributeModifier> |
field_23745 |
ATTACK_DAMAGE_MODIFIER_UUID, ATTACK_SPEED_MODIFIER_UUID, BLOCK_ITEMS, group, RANDOM| Constructor and Description |
|---|
SwordItem(ToolMaterial toolMaterial,
int attackDamage,
float attackSpeed,
Item.Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canMine(BlockState state,
World world,
BlockPos pos,
PlayerEntity miner) |
float |
getAttackDamage() |
float |
getMiningSpeedMultiplier(ItemStack stack,
BlockState state) |
Multimap<EntityAttribute,EntityAttributeModifier> |
getModifiers(EquipmentSlot equipmentSlot) |
boolean |
isEffectiveOn(BlockState state) |
boolean |
postHit(ItemStack stack,
LivingEntity target,
LivingEntity attacker) |
boolean |
postMine(ItemStack stack,
World world,
BlockState state,
BlockPos pos,
LivingEntity miner) |
canRepair, getEnchantability, getMaterialaddPropertyGetter, appendStacks, appendTooltip, asItem, byRawId, damage, finishUsing, fromBlock, getDrinkSound, getEatSound, getFoodComponent, getGroup, getMaxCount, getMaxDamage, getMaxUseTime, getName, getName, getOrCreateTranslationKey, getPropertyGetter, getRarity, getRawId, getRecipeRemainder, getStackForRender, getTranslationKey, getTranslationKey, getUseAction, hasEnchantmentGlint, hasPropertyGetters, hasRecipeRemainder, inventoryTick, isDamageable, isEnchantable, isFireproof, isFood, isIn, isIn, isNetworkSynced, isUsedOnRelease, onCraft, onStoppedUsing, postProcessTag, rayTrace, shouldSyncTagToClient, toString, usageTick, use, useOnBlock, useOnEntityprivate final float attackDamage
private final Multimap<EntityAttribute,EntityAttributeModifier> field_23745
public SwordItem(ToolMaterial toolMaterial, int attackDamage, float attackSpeed, Item.Settings settings)
public float getAttackDamage()
public boolean canMine(BlockState state, World world, BlockPos pos, PlayerEntity miner)
public float getMiningSpeedMultiplier(ItemStack stack, BlockState state)
getMiningSpeedMultiplier in class Itempublic boolean postHit(ItemStack stack, LivingEntity target, LivingEntity attacker)
public boolean postMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner)
public boolean isEffectiveOn(BlockState state)
isEffectiveOn in class Itempublic Multimap<EntityAttribute,EntityAttributeModifier> getModifiers(EquipmentSlot equipmentSlot)
getModifiers in class Item