Class PlacedStoneBlock


public class PlacedStoneBlock extends ClusterBlock
Block that represents loose stone items (up to 4)

Each metadata bit represents a stone occupying a corner of the block

  • Constructor Details

    • PlacedStoneBlock

      public PlacedStoneBlock(int id, int metadata)
  • Method Details

    • onBlockPlaced

      public int onBlockPlaced(World world, int x, int y, int z, int facing, float clickX, float clickY, float clickZ, int metadata)
      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
    • onBlockActivated

      public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float clickX, float clickY, float clickZ)
      Description copied from class: Block
      Called upon block activation (right click on the block.)
      Overrides:
      onBlockActivated in class ClusterBlock
    • collisionRayTrace

      public MovingObjectPosition collisionRayTrace(World world, int x, int y, int z, Vec3 startRay, Vec3 endRay)
      Overrides:
      collisionRayTrace in class Block
    • getSelectedBoundingBoxFromPool

      public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, MovingObjectPosition hit)
      Description copied from class: Block
      Replaces vanilla call in RenderGlobal to provide ray trace info so specific portions of the block can be highlighted as selected
      Overrides:
      getSelectedBoundingBoxFromPool in class Block
    • attemptToCombineWithBlock

      public boolean attemptToCombineWithBlock(ItemStack itemStack, World world, int i, int j, int k, int facing, float clickX, float clickY, float clickZ)
      Description copied from class: ClusterBlock
      true if the incoming ItemStack has successfully combined with this cluster block. Facing and click data are provided for granular interaction.

      Hook for ClusterBlockItem

      Overrides:
      attemptToCombineWithBlock in class ClusterBlock
    • decrementClusterCount

      public boolean decrementClusterCount(World world, int x, int y, int z)
      Description copied from class: ClusterBlock
      Decrements the cluster count
      Overrides:
      decrementClusterCount in class ClusterBlock
    • idDropped

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

      public int damageDropped(int meta)
      Description copied from class: Block
      Determines the damage on the item the block drops. Used in cloth and wood.
      Overrides:
      damageDropped in class Block
    • canPlaceBlockAt

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

      public int getClusterCount(int metadata)
      Overrides:
      getClusterCount in class ClusterBlock
      Returns:
      The current count of items represented in this block
    • getClusterMax

      public int getClusterMax()
      Description copied from class: ClusterBlock
      Gets the maximum cluster count in this block
      Overrides:
      getClusterMax in class ClusterBlock
    • getBlockBoundsFromPoolBasedOnState

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

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

      public boolean rotateAroundJAxis(World world, int i, int j, int k, boolean reverse)
      Description copied from class: Block
      Returns true if the facing has actually changed as a result of this call
      Overrides:
      rotateAroundJAxis in class Block
    • setCornerFromClick

      public boolean setCornerFromClick(World world, int x, int y, int z, float clickX, float clickZ)
      Puts an item at clicked corner
      Returns:
      true if the item was successfully placed
    • isCornerAvailable

      public boolean isCornerAvailable(int meta, int mask)
      true if corner is unoccupied at clicked
    • setOccupiedFlag

      public void setOccupiedFlag(World world, int x, int y, int z, int mask, boolean value)
      Sets flag at provided bitmask
    • 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 renderer, int i, int j, int k)
      Overrides:
      renderBlock in class Block