net.minecraft.item

## Class ItemBlock

- java.lang.Object
- - net.minecraft.item.Item
  - - net.minecraft.item.ItemBlock

- Direct Known Subclasses:
    ItemBlockWithMetadata, ItemCloth, ItemColored, ItemLeaves, ItemMultiTextureTile, ItemPiston, ItemSlab

      public class ItemBlock
      extends Item

- - ### Field Summary

    - ### Fields inherited from class net.minecraft.item.Item

      `appleGold, appleRed, arrow, axeDiamond, axeGold, axeIron, axeStone, axeWood, bakedPotato, bed, beefCooked, beefRaw, blazePowder, blazeRod, boat, bone, book, bootsChain, bootsDiamond, bootsGold, bootsIron, bootsLeather, bow, bowlEmpty, bowlSoup, bread, brewingStand, brick, bucketEmpty, bucketLava, bucketMilk, bucketWater, cake, carrot, carrotOnAStick, cauldron, chickenCooked, chickenRaw, clay, coal, comparator, compass, cookie, diamond, doorIron, doorWood, dyePowder, egg, emerald, emptyMap, enchantedBook, enderPearl, expBottle, eyeOfEnder, feather, fermentedSpiderEye, fireballCharge, firework, fireworkCharge, fishCooked, fishingRod, fishRaw, flint, flintAndSteel, flowerPot, ghastTear, glassBottle, glowstone, goldenCarrot, goldNugget, gunpowder, helmetChain, helmetDiamond, helmetGold, helmetIron, helmetLeather, hoeDiamond, hoeGold, hoeIron, hoeStone, hoeWood, horseArmorDiamond, horseArmorGold, horseArmorIron, ingotGold, ingotIron, itemFrame, itemID, itemsList, leash, leather, legsChain, legsDiamond, legsGold, legsIron, legsLeather, magmaCream, map, melon, melonSeeds, minecartCrate, minecartEmpty, minecartHopper, minecartPowered, minecartTnt, monsterPlacer, nameTag, netherQuartz, netherrackBrick, netherStalkSeeds, netherStar, painting, paper, pickaxeDiamond, pickaxeGold, pickaxeIron, pickaxeStone, pickaxeWood, plateChain, plateDiamond, plateGold, plateIron, plateLeather, pocketSundial, poisonousPotato, porkCooked, porkRaw, potato, potion, pumpkinPie, pumpkinSeeds, record11, record13, recordBlocks, recordCat, recordChirp, recordFar, recordMall, recordMellohi, recordStal, recordStrad, recordWait, recordWard, redstone, redstoneRepeater, reed, rottenFlesh, saddle, seeds, shears, shovelDiamond, shovelGold, shovelIron, shovelStone, shovelWood, sign, silk, skull, slimeBall, snowball, speckledMelon, spiderEye, stick, sugar, swordDiamond, swordGold, swordIron, swordStone, swordWood, wheat, writableBook, writtenBook`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ItemBlock(int par1)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canPlaceItemBlockOnSide(World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer, ItemStack par7ItemStack)`
    `int` | `getBlockID()` Returns the blockID for this Item
    `CreativeTabs` | `getCreativeTab()`
    `Icon` | `getIconFromDamage(int par1)`
    `int` | `getSpriteNumber()`
    `void` | `getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)`
    `String` | `getUnlocalizedName()` Returns the unlocalized name of this item.
    `String` | `getUnlocalizedName(ItemStack par1ItemStack)` Returns the unlocalized name of this item.
    `boolean` | `onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)` Callback for item usage.
    `boolean` | `placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata)` Called to actually place the block, after the location is determined and all permission checks have been made.
    `void` | `registerIcons(IconRegister par1IconRegister)`

    - ### Methods inherited from class net.minecraft.item.Item

      `addInformation, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesContainerItemLeaveCraftingGrid, getArmorModel, getArmorTexture, getArmorTexture, getChestGenBase, getColorFromItemStack, getContainerItem, getContainerItemStack, getCreativeTabs, getDamage, getDamageVsEntity, getDisplayDamage, getEntityLifespan, getFontRenderer, getHasSubtypes, getIcon, getIcon, getIconFromDamageForRenderPass, getIconIndex, getIsRepairable, getItemAttributeModifiers, getItemDisplayName, getItemEnchantability, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getPotionEffect, getPotionEffect, getRarity, getRenderPasses, getShareTag, getSmeltingExperience, getStatName, getStrVsBlock, getStrVsBlock, getUnlocalizedNameInefficiently, hasContainerItem, hasCustomEntity, hasEffect, hasEffect, hitEntity, isBookEnchantable, isDamageable, isDamaged, isFull3D, isItemTool, isMap, isPotionIngredient, isPotionIngredient, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTickUpdate, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEaten, onEntityItemUpdate, onEntitySwing, onItemRightClick, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingItemTick, renderHelmetOverlay, requiresMultipleRenderPasses, setContainerItem, setCreativeTab, setDamage, setFull3D, setMaxDamage, setMaxStackSize, setNoRepair, setPotionEffect, setTextureName, setUnlocalizedName, shouldPassSneakingClickToBlock, shouldRotateAroundWhenRendering`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ItemBlock

          public ItemBlock(int par1)

  - ### Method Detail

    - #### getBlockID

          public int getBlockID()

      Returns the blockID for this Item

    - #### getSpriteNumber

          public int getSpriteNumber()

      Overrides:
        `getSpriteNumber` in class `Item`

    - #### getIconFromDamage

          public Icon getIconFromDamage(int par1)

      Overrides:
        `getIconFromDamage` in class `Item`

    - #### onItemUse

          public boolean onItemUse(ItemStack par1ItemStack,
                          EntityPlayer par2EntityPlayer,
                          World par3World,
                          int par4,
                          int par5,
                          int par6,
                          int par7,
                          float par8,
                          float par9,
                          float par10)

      Callback for item usage. If the item does something special on right clicking, he will have one of those. Return True if something happen and false if it don't. This is for ITEMS, not BLOCKS
      Overrides:
        `onItemUse` in class `Item`

    - #### canPlaceItemBlockOnSide

          public boolean canPlaceItemBlockOnSide(World par1World,
                                        int par2,
                                        int par3,
                                        int par4,
                                        int par5,
                                        EntityPlayer par6EntityPlayer,
                                        ItemStack par7ItemStack)

    - #### getUnlocalizedName

          public String getUnlocalizedName(ItemStack par1ItemStack)

      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()

      Overrides:
        `getCreativeTab` in class `Item`

    - #### getSubItems

          public void getSubItems(int par1,
                         CreativeTabs par2CreativeTabs,
                         List par3List)

      Overrides:
        `getSubItems` in class `Item`

    - #### registerIcons

          public void registerIcons(IconRegister par1IconRegister)

      Overrides:
        `registerIcons` in class `Item`

    - #### placeBlockAt

          public boolean placeBlockAt(ItemStack stack,
                             EntityPlayer player,
                             World world,
                             int x,
                             int y,
                             int z,
                             int side,
                             float hitX,
                             float hitY,
                             float hitZ,
                             int metadata)

      Called to actually place the block, after the location is determined and all permission checks have been made.
      Parameters:
        `stack` - The item stack that was used to place the block. This can be changed inside the method.
        `player` - The player who is placing the block. Can be null if the block is not being placed by a player.
        `side` - The side the player (or machine) right-clicked on.