Class BlockPistonExtension

java.lang.Object
net.minecraft.src.Block
net.minecraft.src.BlockPistonExtension

public class BlockPistonExtension extends Block
  • Constructor Details

    • BlockPistonExtension

      public BlockPistonExtension(int par1)
  • Method Details

    • setHeadTexture

      public void setHeadTexture(Icon par1Icon)
    • clearHeadTexture

      public void clearHeadTexture()
    • onBlockHarvested

      public void onBlockHarvested(World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer)
      Called when the block is attempted to be harvested
      Overrides:
      onBlockHarvested in class Block
    • breakBlock

      public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
      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 Block
    • getIcon

      public Icon getIcon(int par1, int par2)
      From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
      Overrides:
      getIcon in class Block
    • registerIcons

      public void registerIcons(IconRegister par1IconRegister)
      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
    • getRenderType

      public int getRenderType()
      The type of render function that is called for this block
      Overrides:
      getRenderType in class Block
    • isOpaqueCube

      public boolean isOpaqueCube()
      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()
      If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
      Overrides:
      renderAsNormalBlock in class Block
    • canPlaceBlockAt

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

      public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5)
      checks to see if you can place this block can be placed on that side of a block: BlockLever overrides
      Overrides:
      canPlaceBlockOnSide in class Block
    • quantityDropped

      public int quantityDropped(Random par1Random)
      Returns the quantity of items to drop on block destruction.
      Overrides:
      quantityDropped in class Block
    • setBlockBoundsBasedOnState

      public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
      Updates the blocks bounds based on its current state. Args: world, x, y, z
      Overrides:
      setBlockBoundsBasedOnState in class Block
    • onNeighborBlockChange

      public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
      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
      Overrides:
      onNeighborBlockChange in class Block
    • getDirectionMeta

      public static int getDirectionMeta(int par0)
    • idPicked

      public int idPicked(World par1World, int par2, int par3, int par4)
      only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative)
      Overrides:
      idPicked in class Block
    • getAsPistonMovingBoundingBox

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

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

      public boolean hasLargeCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency)
      Description copied from class: Block
      large attachment points that can support a full block width
      Overrides:
      hasLargeCenterHardPointToFacing in class Block
    • addCollisionBoxesToList

      public void addCollisionBoxesToList(World world, int i, int j, int k, AxisAlignedBB intersectingBox, List list, Entity entity)
      Description copied from class: Block
      Adds all intersecting collision boxes to a list. (Be sure to only add boxes to the list if they intersect the mask.) Parameters: World, X, Y, Z, mask, list, colliding entity // +++START EDIT+++ FCNOTE: The "mask" referred to above is just the bounding box to check for intersection with // ---END EDIT---
      Overrides:
      addCollisionBoxesToList in class Block
    • getBlockBoundsFromPoolBasedOnState

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

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

      public ItemStack getStackRetrievedByBlockDispenser(World world, int i, int j, int k)
      Description copied from class: Block
      If the stack returned is null, the block will not be retrieved
      Overrides:
      getStackRetrievedByBlockDispenser in class Block
    • renderBlock

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

      @Environment(CLIENT) public boolean shouldSideBeRendered(IBlockAccess blockAccess, int iNeighborI, int iNeighborJ, int iNeighborK, int iSide)
      Overrides:
      shouldSideBeRendered in class Block