public class ItemSword extends Item
Item.ToolMaterial
bFull3D, canRepair, delegate, hasSubtypes, itemModifierUUID, itemRand, itemRegistry, maxStackSize
Constructor and Description |
---|
ItemSword(Item.ToolMaterial material) |
Modifier and Type | Method and Description |
---|---|
boolean |
canHarvestBlock(Block blockIn)
Check whether this Item can harvest the given Block
|
float |
getDamageVsEntity()
Returns the amount of damage this item will deal.
|
boolean |
getIsRepairable(ItemStack toRepair,
ItemStack repair)
Return whether this item is repairable in an anvil.
|
<any> |
getItemAttributeModifiers() |
int |
getItemEnchantability()
Return the enchantability factor of the item, most of the time is based on material.
|
EnumAction |
getItemUseAction(ItemStack stack)
returns the action that specifies what animation to play when the items is being used
|
int |
getMaxItemUseDuration(ItemStack stack)
How long it takes to use or consume an item
|
float |
getStrVsBlock(ItemStack stack,
Block block) |
java.lang.String |
getToolMaterialName()
Return the name for this tool's material.
|
boolean |
hitEntity(ItemStack stack,
EntityLivingBase target,
EntityLivingBase attacker)
Current implementations of this method in child classes do not use the entry argument beside ev.
|
boolean |
isFull3D()
Returns True is the item is renderer in full 3D when hold.
|
boolean |
onBlockDestroyed(ItemStack stack,
World worldIn,
Block blockIn,
BlockPos pos,
EntityLivingBase playerIn)
Called when a Block is destroyed using this Item.
|
ItemStack |
onItemRightClick(ItemStack itemStackIn,
World worldIn,
EntityPlayer playerIn)
Called whenever this item is equipped and the right mouse button is pressed.
|
addInformation, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getArmorModel, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getChestGenBase, getColorFromItemStack, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDigSpeed, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getHighlightTip, getIdFromItem, getItemById, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getMaxDamage, getMaxDamage, getMetadata, getMetadata, getModel, getMovingObjectPositionFromPlayer, getPotionEffect, getRarity, getRegistryName, getShareTag, getSmeltingExperience, getSubItems, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasEffect, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isItemTool, isMap, isPotionIngredient, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUse, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setPotionEffect, setRegistryName, setRegistryName, setRegistryName, setUnlocalizedName, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBT
public ItemSword(Item.ToolMaterial material)
public float getDamageVsEntity()
public float getStrVsBlock(ItemStack stack, Block block)
getStrVsBlock
in class Item
public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
public boolean onBlockDestroyed(ItemStack stack, World worldIn, Block blockIn, BlockPos pos, EntityLivingBase playerIn)
onBlockDestroyed
in class Item
public boolean isFull3D()
public EnumAction getItemUseAction(ItemStack stack)
getItemUseAction
in class Item
public int getMaxItemUseDuration(ItemStack stack)
getMaxItemUseDuration
in class Item
public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn)
onItemRightClick
in class Item
public boolean canHarvestBlock(Block blockIn)
canHarvestBlock
in class Item
public int getItemEnchantability()
getItemEnchantability
in class Item
public java.lang.String getToolMaterialName()
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair)
getIsRepairable
in class Item
public <any> getItemAttributeModifiers()
getItemAttributeModifiers
in class Item