Class StairsBlock

Direct Known Subclasses:
BlackStoneStairsBlock, BrickStairsBlock, CobblestoneStairsBlock, FallingStairsBlock, NetherBrickStairsBlock, SandstoneStairsBlock, StoneBrickStairsBlock, WhiteStoneStairsBlock, WoodStairsBlock

public class StairsBlock extends StairsBlockBase
  • Field Details

    • referenceBlock

      protected final Block referenceBlock
    • referenceBlockMetadata

      protected final int referenceBlockMetadata
  • Constructor Details

    • StairsBlock

      public StairsBlock(int iBlockID, Block referenceBlock, int iReferenceBlockMetadata)
  • Method Details

    • onBlockClicked

      public void onBlockClicked(World world, int i, int j, int k, EntityPlayer player)
      Description copied from class: Block
      Called when the block is clicked by a player. Args: x, y, z, entityPlayer
      Overrides:
      onBlockClicked in class Block
    • onBlockDestroyedByPlayer

      public void onBlockDestroyedByPlayer(World world, int i, int j, int k, int iMetadata)
      Description copied from class: Block
      Called right before the block is destroyed by a player. Args: world, x, y, z, metaData // +++START EDIT+++ FCNOTE: Called AFTER block is set to air, not before // ---END EDIT---
      Overrides:
      onBlockDestroyedByPlayer in class Block
    • getExplosionResistance

      public float getExplosionResistance(Entity entity)
      Description copied from class: Block
      Returns how much this block can resist explosions from the passed in entity.
      Overrides:
      getExplosionResistance in class Block
    • tickRate

      public int tickRate(World world)
      Description copied from class: Block
      How many world ticks before ticking
      Overrides:
      tickRate in class Block
    • velocityToAddToEntity

      public void velocityToAddToEntity(World world, int i, int j, int k, Entity entity, Vec3 velocityVec)
      Description copied from class: Block
      Can add to the passed in vector for a movement vector to be applied to the entity. Args: x, y, z, entity, vec3d
      Overrides:
      velocityToAddToEntity in class Block
    • isCollidable

      public boolean isCollidable()
      Description copied from class: Block
      Returns if this block is collidable (only used by Fire). Args: x, y, z
      Overrides:
      isCollidable in class Block
    • canCollideCheck

      public boolean canCollideCheck(int iMetadata, boolean flag)
      Description copied from class: Block
      Returns whether this block is collideable based on the arguments passed in \n@param par1 block metaData \n@param par2 whether the player right-clicked while holding a boat
      Overrides:
      canCollideCheck in class Block
    • canPlaceBlockAt

      public boolean canPlaceBlockAt(World world, int i, int j, int k)
      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
    • onBlockAdded

      public void onBlockAdded(World world, int i, int j, int k)
      Description copied from class: Block
      Called whenever the block is added into the world. Args: world, x, y, z // +++START EDIT+++ FCNOTE: Called on server only // ---END EDIT---
      Overrides:
      onBlockAdded in class Block
    • breakBlock

      public void breakBlock(World world, int i, int j, int k, int iBlockID, int iMetadata)
      Description copied from class: Block
      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 ??ejects contained items into the world, and notifies neighbours of an update, as appropriate?? // +++START EDIT+++ FCNOTE: Called on server only. Called AFTER block is set, so it is no longer valid at pos. // ---END EDIT---
      Overrides:
      breakBlock in class Block
    • onEntityWalking

      public void onEntityWalking(World world, int i, int j, int k, Entity entity)
      Description copied from class: Block
      Called whenever an entity is walking on top of this block. Args: world, x, y, z, entity
      Overrides:
      onEntityWalking in class Block
    • updateTick

      public void updateTick(World world, int i, int j, int k, Random rand)
      Description copied from class: Block
      Ticks the block if it's been scheduled // +++START EDIT+++ FCNOTE: Called on server only // ---END EDIT---
      Overrides:
      updateTick 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
    • onBlockDestroyedByExplosion

      public void onBlockDestroyedByExplosion(World world, int i, int j, int k, Explosion explosion)
      Description copied from class: Block
      // +++START EDIT+++ Called upon the block being destroyed by an explosion // ---END EDIT---
      Overrides:
      onBlockDestroyedByExplosion in class Block
    • randomDisplayTick

      @Environment(CLIENT) public void randomDisplayTick(World world, int i, int j, int k, Random rand)
      Description copied from class: Block
      A randomly called display update to be able to add particles or other items for display
      Overrides:
      randomDisplayTick in class Block
    • getMixedBrightnessForBlock

      @Environment(CLIENT) public int getMixedBrightnessForBlock(IBlockAccess blockAccess, int i, int j, int k)
      Description copied from class: Block
      Goes straight to getLightBrightnessForSkyBlocks for Blocks, does some fancy computing for Fluids
      Overrides:
      getMixedBrightnessForBlock in class Block
    • getBlockBrightness

      @Environment(CLIENT) public float getBlockBrightness(IBlockAccess blockAccess, int i, int j, int k)
      Description copied from class: Block
      How bright to render this block based on the light its receiving. Args: iBlockAccess, x, y, z
      Overrides:
      getBlockBrightness in class Block
    • getRenderBlockPass

      @Environment(CLIENT) public int getRenderBlockPass()
      Description copied from class: Block
      // +++START EDIT+++ // ---END EDIT--- Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
      Overrides:
      getRenderBlockPass 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
    • getSelectedBoundingBoxFromPool

      @Environment(CLIENT) public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int i, int j, int k)
      Overrides:
      getSelectedBoundingBoxFromPool in class Block
    • 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