public class ItemTool extends Item
Item.ToolMaterial
IForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>
Modifier and Type | Field and Description |
---|---|
protected float |
attackSpeed |
protected float |
damageVsEntity |
protected float |
efficiencyOnProperMaterial |
protected Item.ToolMaterial |
toolMaterial |
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, bFull3D, canRepair, hasSubtypes, itemRand, maxStackSize, REGISTRY
delegate
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 |
---|---|
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() |
float |
getStrVsBlock(ItemStack stack,
IBlockState state) |
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,
IBlockState state,
BlockPos pos,
EntityLivingBase entityLiving) |
addInformation, addPropertyOverride, canApplyAtEnchantingTable, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDefaultInstance, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHasSubtypes, getHighlightTip, getIdFromItem, getItemById, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getNBTShareTag, getPropertyGetter, getRarity, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getSubItems, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasCustomProperties, hasEffect, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isEnchantable, isMap, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemRightClick, onItemUse, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, rayTrace, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setUnlocalizedName, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBT
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
protected float efficiencyOnProperMaterial
protected float damageVsEntity
protected float attackSpeed
protected Item.ToolMaterial toolMaterial
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 getStrVsBlock(ItemStack stack, IBlockState state)
getStrVsBlock
in class Item
public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
public boolean onBlockDestroyed(ItemStack stack, World worldIn, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
onBlockDestroyed
in class Item
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(EntityEquipmentSlot equipmentSlot)
getItemAttributeModifiers
in class Item
public int getHarvestLevel(ItemStack stack, java.lang.String toolClass, @Nullable EntityPlayer player, @Nullable IBlockState blockState)
Item
getHarvestLevel
in class Item
stack
- 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