Class PlacedToolBlock

All Implemented Interfaces:
ITileEntityProvider

public class PlacedToolBlock extends BlockContainer
  • Constructor Details

    • PlacedToolBlock

      public PlacedToolBlock(int iBlockID)
  • Method Details

    • canPlaceBlockAt

      public boolean canPlaceBlockAt(World world, int x, int y, int z)
      Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
      Overrides:
      canPlaceBlockAt in class Block
    • createNewTileEntity

      public TileEntity createNewTileEntity(World world)
      Description copied from interface: ITileEntityProvider
      Returns a new instance of a block's tile entity class. Called on placing the block.
    • breakBlock

      public void breakBlock(World world, int i, int j, int k, int iBlockID, int iMetadata)
      Description copied from class: BlockContainer
      Called on server worlds only when the block has been replaced by a different block ID, or the same block with a different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old metadata
      Overrides:
      breakBlock in class BlockContainer
    • isOpaqueCube

      public boolean isOpaqueCube()
      Description copied from class: Block
      // +++START EDIT+++ // ---END EDIT--- Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
      Overrides:
      isOpaqueCube in class Block
    • renderAsNormalBlock

      public boolean renderAsNormalBlock()
      Description copied from class: Block
      If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
      Overrides:
      renderAsNormalBlock in class Block
    • idDropped

      public int idDropped(int iMetadata, Random rand, int iFortuneModifier)
      Description copied from class: Block
      Returns the ID of the items to drop on destruction.
      Overrides:
      idDropped in class Block
    • canSilkHarvest

      protected boolean canSilkHarvest()
      Description copied from class: Block
      Return true if a player with Silk Touch can harvest this block directly, and not its normal drops.
      Overrides:
      canSilkHarvest in class Block
    • onBlockPlaced

      public int onBlockPlaced(World world, int i, int j, int k, int iFacing, float fClickX, float fClickY, float fClickZ, int iMetadata)
      Description copied from class: Block
      Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata
      Overrides:
      onBlockPlaced in class Block
    • onNeighborBlockChange

      public void onNeighborBlockChange(World world, int i, int j, int k, int iBlockID)
      Description copied from class: Block
      Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor blockID // +++START EDIT+++ FCNOTE: Only called on server // ---END EDIT---
      Overrides:
      onNeighborBlockChange in class Block
    • onBlockActivated

      public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int iFacing, float fXClick, float fYClick, float fZClick)
      Description copied from class: Block
      Called upon block activation (right click on the block.)
      Overrides:
      onBlockActivated in class Block
    • getCollisionBoundingBoxFromPool

      public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
      Overrides:
      getCollisionBoundingBoxFromPool in class Block
    • getBlockBoundsFromPoolBasedOnState

      public AxisAlignedBB getBlockBoundsFromPoolBasedOnState(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      getBlockBoundsFromPoolBasedOnState in class Block
    • canBeCrushedByFallingEntity

      public boolean canBeCrushedByFallingEntity(World world, int i, int j, int k, EntityFallingSand entity)
      Overrides:
      canBeCrushedByFallingEntity in class Block
    • getFacing

      public int getFacing(int iMetadata)
      Overrides:
      getFacing in class Block
    • setFacing

      public int setFacing(int iMetadata, int iFacing)
      Overrides:
      setFacing in class Block
    • canRotateOnTurntable

      public boolean canRotateOnTurntable(IBlockAccess iBlockAccess, int i, int j, int k)
      Overrides:
      canRotateOnTurntable in class Block
    • canRotateAroundBlockOnTurntableToFacing

      public boolean canRotateAroundBlockOnTurntableToFacing(World world, int i, int j, int k, int iFacing)
      Overrides:
      canRotateAroundBlockOnTurntableToFacing in class Block
    • onRotatedAroundBlockOnTurntableToFacing

      public boolean onRotatedAroundBlockOnTurntableToFacing(World world, int i, int j, int k, int iFacing)
      Description copied from class: Block
      Returns false if the block was destroyed and should not be rotated
      Overrides:
      onRotatedAroundBlockOnTurntableToFacing in class Block
    • canGroundCoverRestOnBlock

      public boolean canGroundCoverRestOnBlock(World world, int i, int j, int k)
      Overrides:
      canGroundCoverRestOnBlock in class Block
    • groundCoverRestingOnVisualOffset

      public float groundCoverRestingOnVisualOffset(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      groundCoverRestingOnVisualOffset in class Block
    • onNeighborDisrupted

      public void onNeighborDisrupted(World world, int i, int j, int k, int iToFacing)
      Overrides:
      onNeighborDisrupted in class Block
    • getVerticalOrientation

      public int getVerticalOrientation(IBlockAccess blockAccess, int i, int j, int k)
      0 = down, 1 = up, 2 = side
    • getVerticalOrientation

      public int getVerticalOrientation(int iMetadata)
    • setVerticalOrientation

      public void setVerticalOrientation(World world, int i, int j, int k, int iLevel)
    • setVerticalOrientation

      public int setVerticalOrientation(int iMetadata, int iLevel)
    • getAttachedToFacing

      protected int getAttachedToFacing(IBlockAccess blockAccess, int i, int j, int k)
    • registerIcons

      @Environment(CLIENT) public void registerIcons(IconRegister register)
      Description copied from class: Block
      When this method is called, your block should register all the icons it needs with the given IconRegister. This is the only chance you get to register icons.
      Overrides:
      registerIcons in class Block
    • renderBlock

      @Environment(CLIENT) public boolean renderBlock(RenderBlocks renderBlocks, int i, int j, int k)
      Overrides:
      renderBlock in class Block