public class ItemTool extends Item
Item.ToolMaterial
Modifier and Type | Field and Description |
---|---|
private float |
damageVsEntity
Damage versus entities.
|
private java.util.Set<Block> |
effectiveBlocks |
protected float |
efficiencyOnProperMaterial |
protected Item.ToolMaterial |
toolMaterial
The material this tool is made from.
|
bFull3D, hasSubtypes, itemModifierUUID, itemRand, itemRegistry, maxStackSize
Modifier | Constructor and Description |
---|---|
protected |
ItemTool(float attackDamage,
Item.ToolMaterial material,
java.util.Set<Block> effectiveBlocks) |
Modifier and Type | Method and Description |
---|---|
boolean |
getIsRepairable(ItemStack toRepair,
ItemStack repair)
Return whether this item is repairable in an anvil.
|
com.google.common.collect.Multimap<java.lang.String,AttributeModifier> |
getItemAttributeModifiers() |
int |
getItemEnchantability()
Return the enchantability factor of the item, most of the time is based on material.
|
float |
getStrVsBlock(ItemStack stack,
Block block) |
Item.ToolMaterial |
getToolMaterial() |
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.
|
addInformation, canHarvestBlock, canItemEditBlocks, getByNameOrId, getColorFromItemStack, getContainerItem, getCreativeTab, getHasSubtypes, getIdFromItem, getItemById, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxItemUseDuration, getMetadata, getMovingObjectPositionFromPlayer, getPotionEffect, getRarity, getShareTag, getSubItems, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasEffect, isDamageable, isItemTool, isMap, isPotionIngredient, itemInteractionForEntity, onCreated, onItemRightClick, onItemUse, onItemUseFinish, onPlayerStoppedUsing, onUpdate, registerItemBlock, registerItems, setContainerItem, setCreativeTab, setFull3D, setHasSubtypes, setMaxDamage, setMaxStackSize, setPotionEffect, setUnlocalizedName, shouldRotateAroundWhenRendering, updateItemStackNBT
private java.util.Set<Block> effectiveBlocks
protected float efficiencyOnProperMaterial
private float damageVsEntity
protected Item.ToolMaterial toolMaterial
protected ItemTool(float attackDamage, Item.ToolMaterial material, java.util.Set<Block> effectiveBlocks)
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 Item.ToolMaterial getToolMaterial()
public int getItemEnchantability()
getItemEnchantability
in class Item
public java.lang.String getToolMaterialName()
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair)
getIsRepairable
in class Item
public com.google.common.collect.Multimap<java.lang.String,AttributeModifier> getItemAttributeModifiers()
getItemAttributeModifiers
in class Item