Class BlockStairs

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

public class BlockStairs extends Block
  • Constructor Details

    • BlockStairs

      protected BlockStairs(int par1, Block par2Block, int par3)
  • Method Details

    • 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
    • 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
    • getRenderType

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

      public void func_82541_d(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
    • isBlockStairsID

      public static boolean isBlockStairsID(int par0)
      Checks if supplied ID is one of a BlockStairs
    • func_82542_g

      public boolean func_82542_g(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
    • func_82544_h

      public boolean func_82544_h(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
    • addCollisionBoxesToList

      public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity)
      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
      Overrides:
      addCollisionBoxesToList in class Block
    • randomDisplayTick

      public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
      A randomly called display update to be able to add particles or other items for display
      Overrides:
      randomDisplayTick in class Block
    • onBlockClicked

      public void onBlockClicked(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer)
      Called when the block is clicked by a player. Args: x, y, z, entityPlayer
      Overrides:
      onBlockClicked in class Block
    • onBlockDestroyedByPlayer

      public void onBlockDestroyedByPlayer(World par1World, int par2, int par3, int par4, int par5)
      Called right before the block is destroyed by a player. Args: world, x, y, z, metaData
      Overrides:
      onBlockDestroyedByPlayer in class Block
    • getMixedBrightnessForBlock

      public int getMixedBrightnessForBlock(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
      Goes straight to getLightBrightnessForSkyBlocks for Blocks, does some fancy computing for Fluids
      Overrides:
      getMixedBrightnessForBlock in class Block
    • getBlockBrightness

      public float getBlockBrightness(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
      How bright to render this block based on the light its receiving. Args: iBlockAccess, x, y, z
      Overrides:
      getBlockBrightness in class Block
    • getExplosionResistance

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

      public int getRenderBlockPass()
      Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
      Overrides:
      getRenderBlockPass 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
    • tickRate

      public int tickRate(World par1World)
      How many world ticks before ticking
      Overrides:
      tickRate in class Block
    • getSelectedBoundingBoxFromPool

      public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
      Returns the bounding box of the wired rectangular prism to render.
      Overrides:
      getSelectedBoundingBoxFromPool in class Block
    • velocityToAddToEntity

      public void velocityToAddToEntity(World par1World, int par2, int par3, int par4, Entity par5Entity, Vec3 par6Vec3)
      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()
      Returns if this block is collidable (only used by Fire). Args: x, y, z
      Overrides:
      isCollidable in class Block
    • canCollideCheck

      public boolean canCollideCheck(int par1, boolean par2)
      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 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
    • 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
    • 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
    • onEntityWalking

      public void onEntityWalking(World par1World, int par2, int par3, int par4, Entity par5Entity)
      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 par1World, int par2, int par3, int par4, Random par5Random)
      Ticks the block if it's been scheduled
      Overrides:
      updateTick 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
    • onBlockDestroyedByExplosion

      public void onBlockDestroyedByExplosion(World par1World, int par2, int par3, int par4, Explosion par5Explosion)
      Called upon the block being destroyed by an explosion
      Overrides:
      onBlockDestroyedByExplosion in class Block
    • onBlockPlacedBy

      public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack)
      Called when the block is placed in the world.
      Overrides:
      onBlockPlacedBy in class Block
    • onBlockPlaced

      public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
      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
    • collisionRayTrace

      public MovingObjectPosition collisionRayTrace(World par1World, int par2, int par3, int par4, Vec3 par5Vec3, Vec3 par6Vec3)
      Ray traces through the blocks collision from start vector to end vector returning a ray trace hit. Args: world, x, y, z, startVec, endVec
      Overrides:
      collisionRayTrace 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