net.minecraft.item

## Class ItemBlock

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

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

      public class ItemBlock
      extends Item

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.minecraft.item.Item

      `Item.ToolMaterial`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `Block` | `field_150939_a`

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

      `bFull3D, canRepair, field_111210_e, hasSubtypes, iconString, itemIcon, itemRand, itemRegistry, maxStackSize`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ItemBlock(Block p_i45328_1_)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `func_150936_a(World p_150936_1_, int p_150936_2_, int p_150936_3_, int p_150936_4_, int p_150936_5_, EntityPlayer p_150936_6_, ItemStack p_150936_7_)`
    `CreativeTabs` | `getCreativeTab()`
    `IIcon` | `getIconFromDamage(int par1)`
    `int` | `getSpriteNumber()`
    `void` | `getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, java.util.List p_150895_3_)`
    `java.lang.String` | `getUnlocalizedName()`
    `java.lang.String` | `getUnlocalizedName(ItemStack par1ItemStack)`
    `boolean` | `onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)`
    `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(IIconRegister par1IconRegister)`
    `ItemBlock` | `setUnlocalizedName(java.lang.String p_150937_1_)`

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

      `addInformation, canHarvestBlock, canItemEditBlocks, createEntity, doesContainerItemLeaveCraftingGrid, doesSneakBypassUse, func_150893_a, func_150897_b, getArmorModel, getArmorTexture, getAttributeModifiers, getChestGenBase, getColorFromItemStack, getContainerItem, getContainerItem, getCreativeTabs, getDamage, getDigSpeed, getDisplayDamage, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getIcon, getIcon, getIconFromDamageForRenderPass, getIconIndex, getIconString, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMovingObjectPositionFromPlayer, getPotionEffect, getRarity, getRenderPasses, getShareTag, getSmeltingExperience, getToolClasses, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasEffect, hasEffect, hitEntity, isBookEnchantable, isDamageable, isDamaged, isFull3D, isItemTool, isMap, isPotionIngredient, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEaten, onEntityItemUpdate, onEntitySwing, onItemRightClick, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, registerItems, renderHelmetOverlay, requiresMultipleRenderPasses, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setPotionEffect, setTextureName, shouldRotateAroundWhenRendering, showDurabilityBar`

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

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

- - ### Field Detail

    - #### field_150939_a

          public final Block field_150939_a

  - ### Constructor Detail

    - #### ItemBlock

          public ItemBlock(Block p_i45328_1_)

  - ### Method Detail

    - #### setUnlocalizedName

          public ItemBlock setUnlocalizedName(java.lang.String p_150937_1_)

      Overrides:
        `setUnlocalizedName` in class `Item`

    - #### getSpriteNumber

          public int getSpriteNumber()

      Overrides:
        `getSpriteNumber` in class `Item`

    - #### getIconFromDamage

          public IIcon 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)

      Overrides:
        `onItemUse` in class `Item`

    - #### func_150936_a

          public boolean func_150936_a(World p_150936_1_,
                              int p_150936_2_,
                              int p_150936_3_,
                              int p_150936_4_,
                              int p_150936_5_,
                              EntityPlayer p_150936_6_,
                              ItemStack p_150936_7_)

    - #### getUnlocalizedName

          public java.lang.String getUnlocalizedName(ItemStack par1ItemStack)

      Overrides:
        `getUnlocalizedName` in class `Item`

    - #### getUnlocalizedName

          public java.lang.String getUnlocalizedName()

      Overrides:
        `getUnlocalizedName` in class `Item`

    - #### getCreativeTab

          public CreativeTabs getCreativeTab()

      Overrides:
        `getCreativeTab` in class `Item`

    - #### getSubItems

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

      Overrides:
        `getSubItems` in class `Item`

    - #### registerIcons

          public void registerIcons(IIconRegister 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.