public class ItemTool extends Item
Item.ToolMaterial| Modifier and Type | Field and Description |
|---|---|
protected float |
efficiencyOnProperMaterial |
protected Item.ToolMaterial |
toolMaterial |
bFull3D, canRepair, delegate, hasSubtypes, itemModifierUUID, itemRand, itemRegistry, maxStackSize| Modifier | Constructor and Description |
|---|---|
protected |
ItemTool(float attackDamage,
Item.ToolMaterial material,
java.util.Set effectiveBlocks) |
| Modifier and Type | Method and Description |
|---|---|
float |
getDigSpeed(ItemStack stack,
IBlockState state)
Metadata-sensitive version of getStrVsBlock
|
int |
getHarvestLevel(ItemStack stack,
java.lang.String toolClass)
Queries the harvest level of this item stack for the specifred tool class,
Returns -1 if this tool is not of the specified type
|
boolean |
getIsRepairable(ItemStack toRepair,
ItemStack repair) |
com.google.common.collect.Multimap |
getItemAttributeModifiers() |
int |
getItemEnchantability() |
float |
getStrVsBlock(ItemStack stack,
Block block) |
java.util.Set<java.lang.String> |
getToolClasses(ItemStack stack) |
Item.ToolMaterial |
getToolMaterial() |
java.lang.String |
getToolMaterialName() |
boolean |
hitEntity(ItemStack stack,
EntityLivingBase target,
EntityLivingBase attacker) |
boolean |
isFull3D() |
boolean |
onBlockDestroyed(ItemStack stack,
World worldIn,
Block blockIn,
BlockPos pos,
EntityLivingBase playerIn) |
addInformation, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getChestGenBase, getColorFromItemStack, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHasSubtypes, getIdFromItem, getItemById, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getModel, getMovingObjectPositionFromPlayer, getPotionEffect, getRarity, getShareTag, getSmeltingExperience, getSubItems, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasEffect, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isItemTool, isMap, isPotionIngredient, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemRightClick, onItemUse, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setPotionEffect, setUnlocalizedName, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBTprotected float efficiencyOnProperMaterial
protected Item.ToolMaterial toolMaterial
protected ItemTool(float attackDamage,
Item.ToolMaterial material,
java.util.Set effectiveBlocks)
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 Item.ToolMaterial getToolMaterial()
public int getItemEnchantability()
getItemEnchantability in class Itempublic java.lang.String getToolMaterialName()
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair)
getIsRepairable in class Itempublic com.google.common.collect.Multimap getItemAttributeModifiers()
getItemAttributeModifiers in class Itempublic int getHarvestLevel(ItemStack stack, java.lang.String toolClass)
ItemgetHarvestLevel in class Itemstack - This item stack instancetoolClass - Tool Classpublic java.util.Set<java.lang.String> getToolClasses(ItemStack stack)
getToolClasses in class Itempublic float getDigSpeed(ItemStack stack, IBlockState state)
ItemgetDigSpeed in class Itemstack - The Item Stackstate - The block state