Class BlockPistonBase

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

public class BlockPistonBase extends Block
  • Field Details

    • isSticky

      protected final boolean isSticky
      This pistons is the sticky one?
    • innerTopIcon

      @Environment(CLIENT) protected Icon innerTopIcon
      Only visible when piston is extended
    • bottomIcon

      @Environment(CLIENT) protected Icon bottomIcon
      Bottom side texture
    • topIcon

      @Environment(CLIENT) protected Icon topIcon
      Top icon of piston depends on (either sticky or normal)
    • isRenderingExtendedBase

      @Environment(CLIENT) public static boolean isRenderingExtendedBase
  • Constructor Details

    • BlockPistonBase

      public BlockPistonBase(int par1, boolean par2)
  • Method Details

    • getPistonExtensionTexture

      public Icon getPistonExtensionTexture()
      Return the either 106 or 107 as the texture index depending on the isSticky flag. This will actually never get called by TileEntityRendererPiston.renderPiston() because TileEntityPiston.shouldRenderHead() will always return false.
    • func_96479_b

      public void func_96479_b(float par1, float par2, float par3, float par4, float par5, float par6)
    • 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
    • isNormalCube

      public boolean isNormalCube(IBlockAccess blockAccess, int x, int y, int z)
      Overrides:
      isNormalCube in class Block
    • isRedstoneConductor

      public boolean isRedstoneConductor(IBlockAccess blockAccess, int x, int y, int z)
      Description copied from class: Block
      Indicate if a block should conduct redstone power
      Overrides:
      isRedstoneConductor in class Block
    • onBlockActivated

      public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
      Called upon block activation (right click on the block.)
      Overrides:
      onBlockActivated 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
    • onBlockAdded

      public void onBlockAdded(World par1World, int par2, int par3, int par4)
      Called whenever the block is added into the world. Args: world, x, y, z
      Overrides:
      onBlockAdded in class Block
    • onBlockEventReceived

      public boolean onBlockEventReceived(World par1World, int par2, int par3, int par4, int par5, int par6)
      Called when the block receives a BlockEvent - see World.addBlockEvent. By default, passes it on to the tile entity at this location. Args: world, x, y, z, blockID, EventID, event parameter
      Overrides:
      onBlockEventReceived in class Block
    • getBlockTileEntityData

      public static NBTTagCompound getBlockTileEntityData(World worldObj, int x, int y, int z)
    • 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
    • getOrientation

      public static int getOrientation(int par0)
      returns an int which describes the direction the piston faces
    • isExtended

      public static boolean isExtended(int par0)
      Determine if the metadata is related to something powered.
    • determineOrientation

      public static int determineOrientation(World par0World, int par1, int par2, int par3, EntityLivingBase par4EntityLivingBase)
      gets the way this piston should face for that entity that placed it.
    • canContainPistonPackingToFacing

      public boolean canContainPistonPackingToFacing(World world, int i, int j, int k, int iFacing)
      Overrides:
      canContainPistonPackingToFacing 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 blockAccess, int i, int j, int k)
      Overrides:
      canRotateOnTurntable in class Block
    • canTransmitRotationHorizontallyOnTurntable

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

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

      public int rotateMetadataAroundYAxis(int iMetadata, boolean bReverse)
      Overrides:
      rotateMetadataAroundYAxis in class Block
    • canBlockBePushedByPiston

      public boolean canBlockBePushedByPiston(World world, int i, int j, int k, int iToFacing)
      Overrides:
      canBlockBePushedByPiston in class Block
    • updatePistonState

      protected void updatePistonState(World world, int x, int y, int z)
    • canExtend

      protected boolean canExtend(World world, int i, int j, int k, int iToFacing)
    • tryExtend

      protected boolean tryExtend(World world, int x, int y, int z, int facingTo)
    • setBlockBoundsBasedOnState

      public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int i, int j, int k)
      Description copied from class: Block
      FCNOTE: DEPRECATED
      Overrides:
      setBlockBoundsBasedOnState in class Block
    • setBlockBoundsForItemRender

      public void setBlockBoundsForItemRender()
      Description copied from class: Block
      Sets the block's bounds for rendering it as an item
      Overrides:
      setBlockBoundsForItemRender in class Block
    • getBlockBoundsFromPoolBasedOnState

      public AxisAlignedBB getBlockBoundsFromPoolBasedOnState(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      getBlockBoundsFromPoolBasedOnState 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
    • getCollisionBoundingBoxFromPool

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

      public boolean canSupportFallingBlocks(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      canSupportFallingBlocks 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
    • preBlockPlacedBy

      public int preBlockPlacedBy(World world, int i, int j, int k, int iMetadata, EntityLivingBase entityBy)
      Description copied from class: Block
      Similar to onBlockPlacedBy() but called before the block is placed rather than after
      Overrides:
      preBlockPlacedBy in class Block
    • onPostBlockPlaced

      public void onPostBlockPlaced(World world, int i, int j, int k, int iMetadata)
      Description copied from class: Block
      Called after a block is placed
      Overrides:
      onPostBlockPlaced in class Block
    • validatePistonState

      protected void validatePistonState(World world, int i, int j, int k)
    • getPistonShovelEjectionDirection

      protected int getPistonShovelEjectionDirection(World world, int i, int j, int k, int iToFacing)
    • canShovelEjectToFacing

      protected boolean canShovelEjectToFacing(World world, int i, int j, int k, int iFacing)
    • onShovelEjectIntoBlock

      protected void onShovelEjectIntoBlock(World world, int i, int j, int k)
    • registerIcons

      @Environment(CLIENT) public void registerIcons(IconRegister par1IconRegister)
      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
    • getIcon

      @Environment(CLIENT) public Icon getIcon(int iSide, int iMetadata)
      Description copied from class: Block
      From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
      Overrides:
      getIcon in class Block
    • getPistonBaseIcon

      @Environment(CLIENT) public static Icon getPistonBaseIcon(String par0Str)
    • 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