From dc3df3edd5843bde0c1335d6a8e460b2c832aa48 Mon Sep 17 00:00:00 2001 From: Foghrye4 Date: Sat, 17 Jun 2017 08:12:18 +0300 Subject: full project files --- javadoc/net/minecraft/item/Item.html | 2289 ++++++++++++++++++++++++++++++++++ 1 file changed, 2289 insertions(+) create mode 100644 javadoc/net/minecraft/item/Item.html (limited to 'javadoc/net/minecraft/item/Item.html') diff --git a/javadoc/net/minecraft/item/Item.html b/javadoc/net/minecraft/item/Item.html new file mode 100644 index 0000000..5725b36 --- /dev/null +++ b/javadoc/net/minecraft/item/Item.html @@ -0,0 +1,2289 @@ + + + + + +Item (Forge API) + + + + + + + +
+ + + + + +
+ + + +
+
net.minecraft.item
+

Class Item

+
+
+ + +
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + + + + + +
        +
      • +

        field_111210_e

        +
        protected static final java.util.UUID field_111210_e
        +
      • +
      + + + +
        +
      • +

        itemRand

        +
        protected static java.util.Random itemRand
        +
      • +
      + + + +
        +
      • +

        maxStackSize

        +
        protected int maxStackSize
        +
      • +
      + + + +
        +
      • +

        bFull3D

        +
        protected boolean bFull3D
        +
      • +
      + + + +
        +
      • +

        hasSubtypes

        +
        protected boolean hasSubtypes
        +
      • +
      + + + +
        +
      • +

        itemIcon

        +
        protected IIcon itemIcon
        +
      • +
      + + + +
        +
      • +

        iconString

        +
        protected java.lang.String iconString
        +
      • +
      + + + + + + + +
        +
      • +

        canRepair

        +
        protected boolean canRepair
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Item

        +
        public Item()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getIdFromItem

        +
        public static int getIdFromItem(Item p_150891_0_)
        +
      • +
      + + + +
        +
      • +

        getItemById

        +
        public static Item getItemById(int p_150899_0_)
        +
      • +
      + + + +
        +
      • +

        getItemFromBlock

        +
        public static Item getItemFromBlock(Block p_150898_0_)
        +
      • +
      + + + +
        +
      • +

        registerItems

        +
        public static void registerItems()
        +
      • +
      + + + +
        +
      • +

        setMaxStackSize

        +
        public Item setMaxStackSize(int p_77625_1_)
        +
      • +
      + + + +
        +
      • +

        getSpriteNumber

        +
        public int getSpriteNumber()
        +
      • +
      + + + +
        +
      • +

        getIconFromDamage

        +
        public IIcon getIconFromDamage(int p_77617_1_)
        +
      • +
      + + + +
        +
      • +

        getIconIndex

        +
        public IIcon getIconIndex(ItemStack p_77650_1_)
        +
      • +
      + + + +
        +
      • +

        onItemUse

        +
        public boolean onItemUse(ItemStack p_77648_1_,
        +                EntityPlayer p_77648_2_,
        +                World p_77648_3_,
        +                int p_77648_4_,
        +                int p_77648_5_,
        +                int p_77648_6_,
        +                int p_77648_7_,
        +                float p_77648_8_,
        +                float p_77648_9_,
        +                float p_77648_10_)
        +
      • +
      + + + +
        +
      • +

        func_150893_a

        +
        public float func_150893_a(ItemStack p_150893_1_,
        +                  Block p_150893_2_)
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        getItemStackLimit

        +
        @Deprecated
        +public int getItemStackLimit()
        +
        Deprecated. 
        +
      • +
      + + + +
        +
      • +

        getMetadata

        +
        public int getMetadata(int p_77647_1_)
        +
      • +
      + + + +
        +
      • +

        getHasSubtypes

        +
        public boolean getHasSubtypes()
        +
      • +
      + + + +
        +
      • +

        setHasSubtypes

        +
        public Item setHasSubtypes(boolean p_77627_1_)
        +
      • +
      + + + +
        +
      • +

        getMaxDamage

        +
        public int getMaxDamage()
        +
      • +
      + + + +
        +
      • +

        setMaxDamage

        +
        public Item setMaxDamage(int p_77656_1_)
        +
      • +
      + + + +
        +
      • +

        isDamageable

        +
        public boolean isDamageable()
        +
      • +
      + + + + + + + +
        +
      • +

        onBlockDestroyed

        +
        public boolean onBlockDestroyed(ItemStack p_150894_1_,
        +                       World p_150894_2_,
        +                       Block p_150894_3_,
        +                       int p_150894_4_,
        +                       int p_150894_5_,
        +                       int p_150894_6_,
        +                       EntityLivingBase p_150894_7_)
        +
      • +
      + + + +
        +
      • +

        func_150897_b

        +
        public boolean func_150897_b(Block p_150897_1_)
        +
      • +
      + + + + + + + +
        +
      • +

        setFull3D

        +
        public Item setFull3D()
        +
      • +
      + + + +
        +
      • +

        isFull3D

        +
        public boolean isFull3D()
        +
      • +
      + + + +
        +
      • +

        shouldRotateAroundWhenRendering

        +
        public boolean shouldRotateAroundWhenRendering()
        +
      • +
      + + + +
        +
      • +

        setUnlocalizedName

        +
        public Item setUnlocalizedName(java.lang.String p_77655_1_)
        +
      • +
      + + + +
        +
      • +

        getUnlocalizedNameInefficiently

        +
        public java.lang.String getUnlocalizedNameInefficiently(ItemStack p_77657_1_)
        +
      • +
      + + + +
        +
      • +

        getUnlocalizedName

        +
        public java.lang.String getUnlocalizedName()
        +
      • +
      + + + +
        +
      • +

        getUnlocalizedName

        +
        public java.lang.String getUnlocalizedName(ItemStack p_77667_1_)
        +
      • +
      + + + +
        +
      • +

        setContainerItem

        +
        public Item setContainerItem(Item p_77642_1_)
        +
      • +
      + + + +
        +
      • +

        doesContainerItemLeaveCraftingGrid

        +
        public boolean doesContainerItemLeaveCraftingGrid(ItemStack p_77630_1_)
        +
      • +
      + + + +
        +
      • +

        getShareTag

        +
        public boolean getShareTag()
        +
      • +
      + + + +
        +
      • +

        getContainerItem

        +
        public Item getContainerItem()
        +
      • +
      + + + +
        +
      • +

        hasContainerItem

        +
        @Deprecated
        +public boolean hasContainerItem()
        +
        Deprecated. 
        +
      • +
      + + + +
        +
      • +

        getColorFromItemStack

        +
        public int getColorFromItemStack(ItemStack p_82790_1_,
        +                        int p_82790_2_)
        +
      • +
      + + + +
        +
      • +

        onUpdate

        +
        public void onUpdate(ItemStack p_77663_1_,
        +            World p_77663_2_,
        +            Entity p_77663_3_,
        +            int p_77663_4_,
        +            boolean p_77663_5_)
        +
      • +
      + + + + + + + +
        +
      • +

        isMap

        +
        public boolean isMap()
        +
      • +
      + + + + + + + +
        +
      • +

        getMaxItemUseDuration

        +
        public int getMaxItemUseDuration(ItemStack p_77626_1_)
        +
      • +
      + + + +
        +
      • +

        onPlayerStoppedUsing

        +
        public void onPlayerStoppedUsing(ItemStack p_77615_1_,
        +                        World p_77615_2_,
        +                        EntityPlayer p_77615_3_,
        +                        int p_77615_4_)
        +
      • +
      + + + +
        +
      • +

        setPotionEffect

        +
        public Item setPotionEffect(java.lang.String p_77631_1_)
        +
      • +
      + + + +
        +
      • +

        getPotionEffect

        +
        public java.lang.String getPotionEffect(ItemStack p_150896_1_)
        +
      • +
      + + + +
        +
      • +

        isPotionIngredient

        +
        public boolean isPotionIngredient(ItemStack p_150892_1_)
        +
      • +
      + + + +
        +
      • +

        addInformation

        +
        public void addInformation(ItemStack p_77624_1_,
        +                  EntityPlayer p_77624_2_,
        +                  java.util.List p_77624_3_,
        +                  boolean p_77624_4_)
        +
      • +
      + + + +
        +
      • +

        getItemStackDisplayName

        +
        public java.lang.String getItemStackDisplayName(ItemStack p_77653_1_)
        +
      • +
      + + + +
        +
      • +

        hasEffect

        +
        @Deprecated
        +public boolean hasEffect(ItemStack p_77636_1_)
        +
        Deprecated. 
        +
      • +
      + + + + + + + +
        +
      • +

        isItemTool

        +
        public boolean isItemTool(ItemStack p_77616_1_)
        +
      • +
      + + + + + + + +
        +
      • +

        getItemEnchantability

        +
        public int getItemEnchantability()
        +
      • +
      + + + +
        +
      • +

        requiresMultipleRenderPasses

        +
        public boolean requiresMultipleRenderPasses()
        +
      • +
      + + + +
        +
      • +

        getIconFromDamageForRenderPass

        +
        public IIcon getIconFromDamageForRenderPass(int p_77618_1_,
        +                                   int p_77618_2_)
        +
      • +
      + + + +
        +
      • +

        getSubItems

        +
        public void getSubItems(Item p_150895_1_,
        +               CreativeTabs p_150895_2_,
        +               java.util.List p_150895_3_)
        +
      • +
      + + + + + + + +
        +
      • +

        getCreativeTab

        +
        public CreativeTabs getCreativeTab()
        +
      • +
      + + + +
        +
      • +

        canItemEditBlocks

        +
        public boolean canItemEditBlocks()
        +
      • +
      + + + +
        +
      • +

        getIsRepairable

        +
        public boolean getIsRepairable(ItemStack p_82789_1_,
        +                      ItemStack p_82789_2_)
        +
      • +
      + + + +
        +
      • +

        registerIcons

        +
        public void registerIcons(IIconRegister p_94581_1_)
        +
      • +
      + + + +
        +
      • +

        getItemAttributeModifiers

        +
        @Deprecated
        +public com.google.common.collect.Multimap getItemAttributeModifiers()
        +
        Deprecated. 
        +
      • +
      + + + +
        +
      • +

        setTextureName

        +
        public Item setTextureName(java.lang.String p_111206_1_)
        +
      • +
      + + + +
        +
      • +

        getIconString

        +
        protected java.lang.String getIconString()
        +
      • +
      + + + +
        +
      • +

        getAttributeModifiers

        +
        public com.google.common.collect.Multimap getAttributeModifiers(ItemStack stack)
        +
        ItemStack sensitive version of getItemAttributeModifiers
        +
      • +
      + + + +
        +
      • +

        onDroppedByPlayer

        +
        public boolean onDroppedByPlayer(ItemStack item,
        +                        EntityPlayer player)
        +
        Called when a player drops the item into the world, + returning false from this will prevent the item from + being removed from the players inventory and spawning + in the world
        +
        Parameters:
        player - The player that dropped the item
        item - The item stack, before the item is removed.
        +
      • +
      + + + +
        +
      • +

        onItemUseFirst

        +
        public boolean onItemUseFirst(ItemStack stack,
        +                     EntityPlayer player,
        +                     World world,
        +                     int x,
        +                     int y,
        +                     int z,
        +                     int side,
        +                     float hitX,
        +                     float hitY,
        +                     float hitZ)
        +
        This is called when the item is used, before the block is activated.
        +
        Parameters:
        stack - The Item Stack
        player - The Player that used the item
        world - The Current World
        x - Target X Position
        y - Target Y Position
        z - Target Z Position
        side - The side of the target hit
        +
        Returns:
        Return true to prevent any further processing.
        +
      • +
      + + + +
        +
      • +

        getDigSpeed

        +
        public float getDigSpeed(ItemStack itemstack,
        +                Block block,
        +                int metadata)
        +
        Metadata-sensitive version of getStrVsBlock
        +
        Parameters:
        itemstack - The Item Stack
        block - The block the item is trying to break
        metadata - The items current metadata
        +
        Returns:
        The damage strength
        +
      • +
      + + + +
        +
      • +

        isRepairable

        +
        public boolean isRepairable()
        +
        Called by CraftingManager to determine if an item is reparable.
        +
        Returns:
        True if reparable
        +
      • +
      + + + +
        +
      • +

        setNoRepair

        +
        public Item setNoRepair()
        +
        Call to disable repair recipes.
        +
        Returns:
        The current Item instance
        +
      • +
      + + + +
        +
      • +

        onBlockStartBreak

        +
        public boolean onBlockStartBreak(ItemStack itemstack,
        +                        int X,
        +                        int Y,
        +                        int Z,
        +                        EntityPlayer player)
        +
        Called before a block is broken. Return true to prevent default block harvesting. + + Note: In SMP, this is called on both client and server sides!
        +
        Parameters:
        itemstack - The current ItemStack
        X - The X Position
        Y - The X Position
        Z - The X Position
        player - The Player that is wielding the item
        +
        Returns:
        True to prevent harvesting, false to continue as normal
        +
      • +
      + + + +
        +
      • +

        onUsingTick

        +
        public void onUsingTick(ItemStack stack,
        +               EntityPlayer player,
        +               int count)
        +
        Called each tick while using an item.
        +
        Parameters:
        stack - The Item being used
        player - The Player using the item
        count - The amount of time in tick the item has been used for continuously
        +
      • +
      + + + +
        +
      • +

        onLeftClickEntity

        +
        public boolean onLeftClickEntity(ItemStack stack,
        +                        EntityPlayer player,
        +                        Entity entity)
        +
        Called when the player Left Clicks (attacks) an entity. + Processed before damage is done, if return value is true further processing is canceled + and the entity is not attacked.
        +
        Parameters:
        stack - The Item being used
        player - The player that is attacking
        entity - The entity being attacked
        +
        Returns:
        True to cancel the rest of the interaction.
        +
      • +
      + + + +
        +
      • +

        getIcon

        +
        public IIcon getIcon(ItemStack stack,
        +            int renderPass,
        +            EntityPlayer player,
        +            ItemStack usingItem,
        +            int useRemaining)
        +
        Player, Render pass, and item usage sensitive version of getIconIndex.
        +
        Parameters:
        stack - The item stack to get the icon for. (Usually this, and usingItem will be the same if usingItem is not null)
        renderPass - The pass to get the icon for, 0 is default.
        player - The player holding the item
        usingItem - The item the player is actively using. Can be null if not using anything.
        useRemaining - The ticks remaining for the active item.
        +
        Returns:
        The icon index
        +
      • +
      + + + +
        +
      • +

        getRenderPasses

        +
        public int getRenderPasses(int metadata)
        +
        Returns the number of render passes/layers this item has. + Usually equates to ItemRenderer.renderItem being called for this many passes. + Does not get called unless requiresMultipleRenderPasses() is true;
        +
        Parameters:
        metadata - The item's metadata
        +
        Returns:
        The number of passes to run.
        +
      • +
      + + + +
        +
      • +

        getContainerItem

        +
        public ItemStack getContainerItem(ItemStack itemStack)
        +
        ItemStack sensitive version of getContainerItem. + Returns a full ItemStack instance of the result.
        +
        Parameters:
        itemStack - The current ItemStack
        +
        Returns:
        The resulting ItemStack
        +
      • +
      + + + +
        +
      • +

        hasContainerItem

        +
        public boolean hasContainerItem(ItemStack stack)
        +
        ItemStack sensitive version of hasContainerItem
        +
        Parameters:
        stack - The current item stack
        +
        Returns:
        True if this item has a 'container'
        +
      • +
      + + + +
        +
      • +

        getEntityLifespan

        +
        public int getEntityLifespan(ItemStack itemStack,
        +                    World world)
        +
        Retrieves the normal 'lifespan' of this item when it is dropped on the ground as a EntityItem. + This is in ticks, standard result is 6000, or 5 mins.
        +
        Parameters:
        itemStack - The current ItemStack
        world - The world the entity is in
        +
        Returns:
        The normal lifespan in ticks.
        +
      • +
      + + + +
        +
      • +

        hasCustomEntity

        +
        public boolean hasCustomEntity(ItemStack stack)
        +
        Determines if this Item has a special entity for when they are in the world. + Is called when a EntityItem is spawned in the world, if true and Item#createCustomEntity + returns non null, the EntityItem will be destroyed and the new Entity will be added to the world.
        +
        Parameters:
        stack - The current item stack
        +
        Returns:
        True of the item has a custom entity, If true, Item#createCustomEntity will be called
        +
      • +
      + + + +
        +
      • +

        createEntity

        +
        public Entity createEntity(World world,
        +                  Entity location,
        +                  ItemStack itemstack)
        +
        This function should return a new entity to replace the dropped item. + Returning null here will not kill the EntityItem and will leave it to function normally. + Called when the item it placed in a world.
        +
        Parameters:
        world - The world object
        location - The EntityItem object, useful for getting the position of the entity
        itemstack - The current item stack
        +
        Returns:
        A new Entity object to spawn or null
        +
      • +
      + + + +
        +
      • +

        onEntityItemUpdate

        +
        public boolean onEntityItemUpdate(EntityItem entityItem)
        +
        Called by the default implemetation of EntityItem's onUpdate method, allowing for cleaner + control over the update of the item without having to write a subclass.
        +
        Parameters:
        entityItem - The entity Item
        +
        Returns:
        Return true to skip any further update code.
        +
      • +
      + + + +
        +
      • +

        getCreativeTabs

        +
        public CreativeTabs[] getCreativeTabs()
        +
        Gets a list of tabs that items belonging to this class can display on, + combined properly with getSubItems allows for a single item to span + many sub-items across many tabs.
        +
        Returns:
        A list of all tabs that this item could possibly be one.
        +
      • +
      + + + +
        +
      • +

        getSmeltingExperience

        +
        public float getSmeltingExperience(ItemStack item)
        +
        Determines the base experience for a player when they remove this item from a furnace slot. + This number must be between 0 and 1 for it to be valid. + This number will be multiplied by the stack size to get the total experience.
        +
        Parameters:
        item - The item stack the player is picking up.
        +
        Returns:
        The amount to award for each item.
        +
      • +
      + + + +
        +
      • +

        getIcon

        +
        public IIcon getIcon(ItemStack stack,
        +            int pass)
        +
        Return the correct icon for rendering based on the supplied ItemStack and render pass. + + Defers to getIconFromDamageForRenderPass(int, int)
        +
        Parameters:
        stack - to render for
        pass - the multi-render pass
        +
        Returns:
        the icon
        +
      • +
      + + + +
        +
      • +

        getChestGenBase

        +
        public WeightedRandomChestContent getChestGenBase(ChestGenHooks chest,
        +                                         java.util.Random rnd,
        +                                         WeightedRandomChestContent original)
        +
        Generates the base Random item for a specific instance of the chest gen, + Enchanted books use this to pick a random enchantment.
        +
        Parameters:
        chest - The chest category to generate for
        rnd - World RNG
        original - Original result registered with the chest gen hooks.
        +
        Returns:
        New values to use as the random item, typically this will be original
        +
      • +
      + + + +
        +
      • +

        doesSneakBypassUse

        +
        public boolean doesSneakBypassUse(World world,
        +                         int x,
        +                         int y,
        +                         int z,
        +                         EntityPlayer player)
        +
        Should this item, when held, allow sneak-clicks to pass through to the underlying block?
        +
        Parameters:
        world - The world
        x - The X Position
        y - The X Position
        z - The X Position
        player - The Player that is wielding the item
        +
        Returns:
        +
      • +
      + + + +
        +
      • +

        onArmorTick

        +
        public void onArmorTick(World world,
        +               EntityPlayer player,
        +               ItemStack itemStack)
        +
        Called to tick armor in the armor slot. Override to do something
        +
        Parameters:
        world -
        player -
        itemStack -
        +
      • +
      + + + +
        +
      • +

        isValidArmor

        +
        public boolean isValidArmor(ItemStack stack,
        +                   int armorType,
        +                   Entity entity)
        +
        Determines if the specific ItemStack can be placed in the specified armor slot.
        +
        Parameters:
        stack - The ItemStack
        armorType - Armor slot ID: 0: Helmet, 1: Chest, 2: Legs, 3: Boots
        entity - The entity trying to equip the armor
        +
        Returns:
        True if the given ItemStack can be inserted in the slot
        +
      • +
      + + + +
        +
      • +

        isBookEnchantable

        +
        public boolean isBookEnchantable(ItemStack stack,
        +                        ItemStack book)
        +
        Allow or forbid the specific book/item combination as an anvil enchant
        +
        Parameters:
        stack - The item
        book - The book
        +
        Returns:
        if the enchantment is allowed
        +
      • +
      + + + +
        +
      • +

        getArmorTexture

        +
        public java.lang.String getArmorTexture(ItemStack stack,
        +                               Entity entity,
        +                               int slot,
        +                               java.lang.String type)
        +
        Called by RenderBiped and RenderPlayer to determine the armor texture that + should be use for the currently equiped item. + This will only be called on instances of ItemArmor. + + Returning null from this function will use the default value.
        +
        Parameters:
        stack - ItemStack for the equpt armor
        entity - The entity wearing the armor
        slot - The slot the armor is in
        type - The subtype, can be null or "overlay"
        +
        Returns:
        Path of texture to bind, or null to use default
        +
      • +
      + + + +
        +
      • +

        getFontRenderer

        +
        public FontRenderer getFontRenderer(ItemStack stack)
        +
        Returns the font renderer used to render tooltips and overlays for this item. + Returning null will use the standard font renderer.
        +
        Parameters:
        stack - The current item stack
        +
        Returns:
        A instance of FontRenderer or null to use default
        +
      • +
      + + + +
        +
      • +

        getArmorModel

        +
        public ModelBiped getArmorModel(EntityLivingBase entityLiving,
        +                       ItemStack itemStack,
        +                       int armorSlot)
        +
        Override this method to have an item handle its own armor rendering.
        +
        Parameters:
        entityLiving - The entity wearing the armor
        itemStack - The itemStack to render the model of
        armorSlot - 0=head, 1=torso, 2=legs, 3=feet
        +
        Returns:
        A ModelBiped to render instead of the default
        +
      • +
      + + + +
        +
      • +

        onEntitySwing

        +
        public boolean onEntitySwing(EntityLivingBase entityLiving,
        +                    ItemStack stack)
        +
        Called when a entity tries to play the 'swing' animation.
        +
        Parameters:
        entityLiving - The entity swinging the item.
        stack - The Item stack
        +
        Returns:
        True to cancel any further processing by EntityLiving
        +
      • +
      + + + +
        +
      • +

        renderHelmetOverlay

        +
        public void renderHelmetOverlay(ItemStack stack,
        +                       EntityPlayer player,
        +                       ScaledResolution resolution,
        +                       float partialTicks,
        +                       boolean hasScreen,
        +                       int mouseX,
        +                       int mouseY)
        +
        Called when the client starts rendering the HUD, for whatever item the player currently has as a helmet. + This is where pumpkins would render there overlay.
        +
        Parameters:
        stack - The ItemStack that is equipped
        player - Reference to the current client entity
        resolution - Resolution information about the current viewport and configured GUI Scale
        partialTicks - Partial ticks for the renderer, useful for interpolation
        hasScreen - If the player has a screen up, which will be rendered after this.
        mouseX - Mouse's X position on screen
        mouseY - Mouse's Y position on screen
        +
      • +
      + + + +
        +
      • +

        getDamage

        +
        public int getDamage(ItemStack stack)
        +
        Return the itemDamage represented by this ItemStack. Defaults to the itemDamage field on ItemStack, but can be overridden here for other sources such as NBT.
        +
        Parameters:
        stack - The itemstack that is damaged
        +
        Returns:
        the damage value
        +
      • +
      + + + +
        +
      • +

        getDisplayDamage

        +
        @Deprecated
        +public int getDisplayDamage(ItemStack stack)
        +
        Deprecated. 
        +
      • +
      + + + +
        +
      • +

        showDurabilityBar

        +
        public boolean showDurabilityBar(ItemStack stack)
        +
        Determines if the durability bar should be rendered for this item. + Defaults to vanilla stack.isDamaged behavior. + But modders can use this for any data they wish.
        +
        Parameters:
        stack - The current Item Stack
        +
        Returns:
        True if it should render the 'durability' bar.
        +
      • +
      + + + +
        +
      • +

        getDurabilityForDisplay

        +
        public double getDurabilityForDisplay(ItemStack stack)
        +
        Queries the percentage of the 'Durability' bar that should be drawn.
        +
        Parameters:
        stack - The current ItemStack
        +
        Returns:
        1.0 for 100% 0 for 0%
        +
      • +
      + + + +
        +
      • +

        getMaxDamage

        +
        public int getMaxDamage(ItemStack stack)
        +
        Return the maxDamage for this ItemStack. Defaults to the maxDamage field in this item, + but can be overridden here for other sources such as NBT.
        +
        Parameters:
        stack - The itemstack that is damaged
        +
        Returns:
        the damage value
        +
      • +
      + + + +
        +
      • +

        isDamaged

        +
        public boolean isDamaged(ItemStack stack)
        +
        Return if this itemstack is damaged. Note only called if isDamageable() is true.
        +
        Parameters:
        stack - the stack
        +
        Returns:
        if the stack is damaged
        +
      • +
      + + + +
        +
      • +

        setDamage

        +
        public void setDamage(ItemStack stack,
        +             int damage)
        +
        Set the damage for this itemstack. Note, this method is responsible for zero checking.
        +
        Parameters:
        stack - the stack
        damage - the new damage value
        +
      • +
      + + + +
        +
      • +

        canHarvestBlock

        +
        public boolean canHarvestBlock(Block par1Block,
        +                      ItemStack itemStack)
        +
        ItemStack sensitive version of #canHarvestBlock(Block)
        +
        Parameters:
        par1Block - The block trying to harvest
        itemStack - The itemstack used to harvest the block
        +
        Returns:
        true if can harvest the block
        +
      • +
      + + + +
        +
      • +

        hasEffect

        +
        public boolean hasEffect(ItemStack par1ItemStack,
        +                int pass)
        +
        Render Pass sensitive version of hasEffect()
        +
      • +
      + + + +
        +
      • +

        getItemStackLimit

        +
        public int getItemStackLimit(ItemStack stack)
        +
        Gets the maximum number of items that this stack should be able to hold. + This is a ItemStack (and thus NBT) sensitive version of Item.getItemStackLimit()
        +
        Parameters:
        stack - The ItemStack
        +
        Returns:
        THe maximum number this item can be stacked to
        +
      • +
      + + + +
        +
      • +

        setHarvestLevel

        +
        public void setHarvestLevel(java.lang.String toolClass,
        +                   int level)
        +
        Sets or removes the harvest level for the specified tool class.
        +
        Parameters:
        toolClass - Class
        level - Harvest level: + Wood: 0 + Stone: 1 + Iron: 2 + Diamond: 3 + Gold: 0
        +
      • +
      + + + +
        +
      • +

        getToolClasses

        +
        public java.util.Set<java.lang.String> getToolClasses(ItemStack stack)
        +
      • +
      + + + +
        +
      • +

        getHarvestLevel

        +
        public 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
        +
        Parameters:
        stack - This item stack instance
        toolClass - Tool Class
        +
        Returns:
        Harvest level, or -1 if not the specified tool type.
        +
      • +
      + + + +
        +
      • +

        getItemEnchantability

        +
        public int getItemEnchantability(ItemStack stack)
        +
        ItemStack sensitive version of getItemEnchantability
        +
        Parameters:
        stack - The ItemStack
        +
        Returns:
        the item echantability value
        +
      • +
      + + + +
        +
      • +

        isBeaconPayment

        +
        public boolean isBeaconPayment(ItemStack stack)
        +
        Whether this Item can be used as a payment to activate the vanilla beacon.
        +
        Parameters:
        stack - the ItemStack
        +
        Returns:
        true if this Item can be used
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + +
+ + + + -- cgit v1.2.3