Class BlockRailBase

java.lang.Object
net.minecraft.src.Block
net.minecraft.src.BlockRailBase
Direct Known Subclasses:
BlockDetectorRail, BlockRail, BlockRailPowered

public abstract class BlockRailBase extends Block
  • Field Details

    • isPowered

      protected final boolean isPowered
      Power related rails have this field at true.
  • Constructor Details

    • BlockRailBase

      protected BlockRailBase(int par1, boolean par2)
  • Method Details

    • isRailBlockAt

      public static final boolean isRailBlockAt(World par0World, int par1, int par2, int par3)
      Returns true if the block at the coordinates of world passed is a valid rail block (current is rail, powered or detector).
    • isRailBlock

      public static final boolean isRailBlock(int par0)
      Return true if the parameter is a blockID for a valid rail block (current is rail, powered or detector).
    • isPowered

      public boolean isPowered()
      Returns true if the block is power related rail.
    • getCollisionBoundingBoxFromPool

      public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
      Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
      Overrides:
      getCollisionBoundingBoxFromPool 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()
      // +++START EDIT+++ // ---END EDIT--- 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
    • quantityDropped

      public int quantityDropped(Random par1Random)
      Returns the quantity of items to drop on block destruction.
      Overrides:
      quantityDropped 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
    • 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
    • func_94358_a

      protected void func_94358_a(World par1World, int par2, int par3, int par4, int par5, int par6, int par7)
    • refreshTrackShape

      protected void refreshTrackShape(World par1World, int par2, int par3, int par4, boolean par5)
      Completely recalculates the track shape based on neighboring tracks
    • getMobilityFlag

      public int getMobilityFlag()
      Returns the mobility information of the block, 0 = free, 1 = can't push but can move over, 2 = total immobility and stop pistons
      Overrides:
      getMobilityFlag 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
    • canRotateOnTurntable

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

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

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