Class ItemBlock

Direct Known Subclasses:
AestheticEarthBlockItem, AestheticNonOpaqueBlockItem, AestheticOpaqueBlockItem, AestheticVegetationBlockItem, AnvilBlockItem, BloodWoodLogBlockItem, CompanionCubeBlockItem, DamageToMetadataBlockItem, DormantSoulforgeBlockItem, FreshPumpkinBlockItem, IceBlockItem, InfiniteBurningTorchBlockItem, InfinteUnlitTorchBlockItem, ItemBlockWithMetadata, ItemCloth, ItemColored, ItemLeaves, ItemMultiTextureTile, ItemPiston, ItemSlab, LeavesBlockItem, LegacyCornerBlockItem, LegacySidingBlockItem, LegacySubstitutionBlockItem, LeverBlockItem, MillstoneBlockItem, MiningChargeBlockItem, MouldingBlockItem, NetherrackBlockItem, PlanterBlockItem, SaplingBlockItem, SidingAndCornerBlockItem, SlabBlockItem, UnfiredPotteryBlockItem, VaseBlockItem, WhiteStoneStairsBlockItem, WoodCornerStubBlockItem, WoodMouldingDecorativeStubBlockItem, WoodMouldingStubBlockItem, WoodSidingDecorativeStubBlockItem, WoodSidingStubBlockItem

public class ItemBlock extends PlaceAsBlockItem
  • Constructor Details

    • ItemBlock

      public ItemBlock(int par1)
  • Method Details

    • getBlockID

      public int getBlockID()
      Returns the blockID for this Item
      Overrides:
      getBlockID in class PlaceAsBlockItem
    • getSpriteNumber

      public int getSpriteNumber()
      Returns 0 for /terrain.png, 1 for /gui/items.png
      Overrides:
      getSpriteNumber in class Item
    • getIconFromDamage

      public Icon getIconFromDamage(int par1)
      Gets an icon index based on an item's damage value
      Overrides:
      getIconFromDamage in class Item
    • getUnlocalizedName

      public String getUnlocalizedName(ItemStack par1ItemStack)
      // +++START EDIT+++ // ---END EDIT--- Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have different names based on their damage or NBT.
      Overrides:
      getUnlocalizedName in class Item
    • getUnlocalizedName

      public String getUnlocalizedName()
      Returns the unlocalized name of this item.
      Overrides:
      getUnlocalizedName in class Item
    • getCreativeTab

      public CreativeTabs getCreativeTab()
      gets the CreativeTab this item is displayed on
      Overrides:
      getCreativeTab in class Item
    • getSubItems

      public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
      returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
      Overrides:
      getSubItems in class Item
    • registerIcons

      public void registerIcons(IconRegister par1IconRegister)
      Overrides:
      registerIcons in class Item
    • getColorFromItemStack

      @Environment(CLIENT) public int getColorFromItemStack(ItemStack var1, int var2)
      Overrides:
      getColorFromItemStack in class Item
    • getBuoyancy

      public float getBuoyancy(int iItemDamage)
      Overrides:
      getBuoyancy in class Item
    • setBuoyancy

      public Item setBuoyancy(float fBuoyancy)
      Overrides:
      setBuoyancy in class Item
    • getFurnaceBurnTime

      public int getFurnaceBurnTime(int iItemDamage)
      Overrides:
      getFurnaceBurnTime in class Item
    • setfurnaceburntime

      public Item setfurnaceburntime(int iBurnTime)
      Overrides:
      setfurnaceburntime in class Item
    • getHerbivoreFoodValue

      public int getHerbivoreFoodValue(int iItemDamage)
      Overrides:
      getHerbivoreFoodValue in class Item
    • setHerbivoreFoodValue

      public Item setHerbivoreFoodValue(int iFoodValue)
      Overrides:
      setHerbivoreFoodValue in class Item
    • getChickenFoodValue

      public int getChickenFoodValue(int iItemDamage)
      Overrides:
      getChickenFoodValue in class Item
    • setChickenFoodValue

      public Item setChickenFoodValue(int iFoodValue)
      Overrides:
      setChickenFoodValue in class Item
    • getPigFoodValue

      public int getPigFoodValue(int iItemDamage)
      Overrides:
      getPigFoodValue in class Item
    • setPigFoodValue

      public Item setPigFoodValue(int iFoodValue)
      Overrides:
      setPigFoodValue in class Item
    • isIncineratedInCrucible

      public boolean isIncineratedInCrucible()
      Overrides:
      isIncineratedInCrucible in class Item
    • setAssociatedBlockID

      public PlaceAsBlockItem setAssociatedBlockID(int iBlockID)
      Overrides:
      setAssociatedBlockID in class PlaceAsBlockItem
    • getHopperFilterIcon

      @Environment(CLIENT) public Icon getHopperFilterIcon()
      Overrides:
      getHopperFilterIcon in class Item