public class ItemSword extends Item
Item.ToolMaterialbFull3D, 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, updateItemStackNBTpublic ItemSword(Item.ToolMaterial material)
public float getDamageVsEntity()
public float getStrVsBlock(ItemStack stack, Block block)
getStrVsBlock in class Itempublic boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
public boolean onBlockDestroyed(ItemStack stack, World worldIn, Block blockIn, BlockPos pos, EntityLivingBase playerIn)
onBlockDestroyed in class Itempublic boolean isFull3D()
public EnumAction getItemUseAction(ItemStack stack)
getItemUseAction in class Itempublic int getMaxItemUseDuration(ItemStack stack)
getMaxItemUseDuration in class Itempublic ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn)
onItemRightClick in class Itempublic boolean canHarvestBlock(Block blockIn)
canHarvestBlock in class Itempublic int getItemEnchantability()
getItemEnchantability in class Itempublic java.lang.String getToolMaterialName()
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair)
getIsRepairable in class Itempublic <any> getItemAttributeModifiers()
getItemAttributeModifiers in class Item