public class SwordItem extends TieredItem
Item.Properties
Modifier and Type | Field and Description |
---|---|
private float |
attackDamage |
private float |
attackSpeed |
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, BLOCK_TO_ITEM, canRepair, group, properties, random
delegate
Constructor and Description |
---|
SwordItem(IItemTier tier,
int attackDamageIn,
float attackSpeedIn,
Item.Properties builder) |
Modifier and Type | Method and Description |
---|---|
boolean |
canHarvestBlock(BlockState blockIn) |
boolean |
canPlayerBreakBlockWhileHolding(BlockState state,
World worldIn,
BlockPos pos,
PlayerEntity player) |
float |
getAttackDamage() |
com.google.common.collect.Multimap<java.lang.String,AttributeModifier> |
getAttributeModifiers(EquipmentSlotType equipmentSlot) |
float |
getDestroySpeed(ItemStack stack,
BlockState state) |
boolean |
hitEntity(ItemStack stack,
LivingEntity target,
LivingEntity attacker) |
boolean |
onBlockDestroyed(ItemStack stack,
World worldIn,
BlockState state,
BlockPos pos,
LivingEntity entityLiving) |
getIsRepairable, getItemEnchantability, getTier
addInformation, addPropertyOverride, asItem, fillItemGroup, getContainerItem, getDefaultInstance, getDefaultTranslationKey, getDisplayName, getDrinkSound, getEatSound, getFood, getGroup, getHarvestLevel, getIdFromItem, getItemById, getItemFromBlock, getItemStackTileEntityRenderer, getMaxDamage, getMaxStackSize, getName, getPropertyGetter, getRarity, getTags, getToolTypes, getTranslationKey, getTranslationKey, getUseAction, getUseDuration, hasContainerItem, hasCustomProperties, hasEffect, inventoryTick, isComplex, isCrossbow, isDamageable, isEnchantable, isFood, isIn, isInGroup, isRepairable, itemInteractionForEntity, onCreated, onItemRightClick, onItemUse, onItemUseFinish, onPlayerStoppedUsing, onUse, rayTrace, shouldSyncTag, toString, updateItemStackNBT
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canHarvestBlock, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getHighlightTip, getItem, getItemEnchantability, getItemStackLimit, getMaxDamage, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getXpRepairRatio, hasContainerItem, hasCustomEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamaged, isShield, onArmorTick, onBlockStartBreak, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, renderHelmetOverlay, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, showDurabilityBar
private final float attackDamage
private final float attackSpeed
public SwordItem(IItemTier tier, int attackDamageIn, float attackSpeedIn, Item.Properties builder)
public float getAttackDamage()
public boolean canPlayerBreakBlockWhileHolding(BlockState state, World worldIn, BlockPos pos, PlayerEntity player)
canPlayerBreakBlockWhileHolding
in class Item
public float getDestroySpeed(ItemStack stack, BlockState state)
getDestroySpeed
in class Item
public boolean hitEntity(ItemStack stack, LivingEntity target, LivingEntity attacker)
public boolean onBlockDestroyed(ItemStack stack, World worldIn, BlockState state, BlockPos pos, LivingEntity entityLiving)
onBlockDestroyed
in class Item
public boolean canHarvestBlock(BlockState blockIn)
canHarvestBlock
in class Item
public com.google.common.collect.Multimap<java.lang.String,AttributeModifier> getAttributeModifiers(EquipmentSlotType equipmentSlot)
getAttributeModifiers
in class Item