public class ItemTool extends Item
Item.ToolMaterialIForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>| Modifier and Type | Field and Description |
|---|---|
protected float |
attackDamage |
protected float |
attackSpeed |
private java.util.Set<Block> |
effectiveBlocks |
protected float |
efficiency |
private java.lang.String |
toolClass |
protected Item.ToolMaterial |
toolMaterial |
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, bFull3D, canRepair, hasSubtypes, itemRand, maxStackSize, REGISTRYdelegate| Modifier | Constructor and Description |
|---|---|
protected |
ItemTool(float attackDamageIn,
float attackSpeedIn,
Item.ToolMaterial materialIn,
java.util.Set<Block> effectiveBlocksIn) |
protected |
ItemTool(Item.ToolMaterial materialIn,
java.util.Set<Block> effectiveBlocksIn) |
| Modifier and Type | Method and Description |
|---|---|
float |
getDestroySpeed(ItemStack stack,
IBlockState state) |
int |
getHarvestLevel(ItemStack stack,
java.lang.String toolClass,
EntityPlayer player,
IBlockState blockState)
Queries the harvest level of this item stack for the specified tool class,
Returns -1 if this tool is not of the specified type
|
boolean |
getIsRepairable(ItemStack toRepair,
ItemStack repair) |
com.google.common.collect.Multimap<java.lang.String,AttributeModifier> |
getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) |
int |
getItemEnchantability() |
java.util.Set<java.lang.String> |
getToolClasses(ItemStack stack) |
java.lang.String |
getToolMaterialName() |
boolean |
hitEntity(ItemStack stack,
EntityLivingBase target,
EntityLivingBase attacker) |
boolean |
isFull3D() |
boolean |
onBlockDestroyed(ItemStack stack,
World worldIn,
IBlockState state,
BlockPos pos,
EntityLivingBase entityLiving) |
addInformation, addPropertyOverride, canApplyAtEnchantingTable, canContinueUsing, canDestroyBlockInCreative, canDisableShield, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getCreatorModId, getDamage, getDefaultInstance, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getForgeRarity, getHasSubtypes, getHighlightTip, getHorseArmorTexture, getHorseArmorType, getIdFromItem, getItemBurnTime, getItemById, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getNBTShareTag, getPropertyGetter, getRarity, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getSubItems, getTileEntityItemStackRenderer, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, getXpRepairRatio, hasContainerItem, hasContainerItem, hasCustomEntity, hasCustomProperties, hasEffect, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isEnchantable, isInCreativeTab, isMap, isRepairable, isShield, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemRightClick, onItemUse, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, rayTrace, readNBTShareTag, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setTileEntityItemStackRenderer, setUnlocalizedName, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBTgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameprivate final java.util.Set<Block> effectiveBlocks
protected float efficiency
protected float attackDamage
protected float attackSpeed
protected Item.ToolMaterial toolMaterial
@Nullable private java.lang.String toolClass
protected ItemTool(float attackDamageIn,
float attackSpeedIn,
Item.ToolMaterial materialIn,
java.util.Set<Block> effectiveBlocksIn)
protected ItemTool(Item.ToolMaterial materialIn, java.util.Set<Block> effectiveBlocksIn)
public float getDestroySpeed(ItemStack stack, IBlockState state)
getDestroySpeed in class Itempublic boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
public boolean onBlockDestroyed(ItemStack stack, World worldIn, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
onBlockDestroyed in class Itempublic 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<java.lang.String,AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot)
getItemAttributeModifiers in class Itempublic int getHarvestLevel(ItemStack stack, java.lang.String toolClass, @Nullable EntityPlayer player, @Nullable IBlockState blockState)
ItemgetHarvestLevel in class Itemstack - This item stack instancetoolClass - Tool Classplayer - The player trying to harvest the given blockstateblockState - The block to harvestpublic java.util.Set<java.lang.String> getToolClasses(ItemStack stack)
getToolClasses in class Item