net.minecraft.block

## Class BlockRailBase

- java.lang.Object
- - net.minecraft.block.Block
  - - net.minecraft.block.BlockRailBase

- Direct Known Subclasses:
    BlockRail, BlockRailDetector, BlockRailPowered

      public abstract class BlockRailBase
      extends Block

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `BlockRailBase.Rail`

    - ### Nested classes/interfaces inherited from class net.minecraft.block.Block

      `Block.SoundType`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `field_150053_a`

    - ### Fields inherited from class net.minecraft.block.Block

      `blockConstructorCalled, blockHardness, blockIcon, blockMaterial, blockParticleGravity, blockRegistry, blockResistance, canBlockGrass, capturedDrops, captureDrops, enableStats, harvesters, isBlockContainer, lightOpacity, lightValue, maxX, maxY, maxZ, minX, minY, minZ, needsRandomTick, opaque, slipperiness, soundTypeAnvil, soundTypeCloth, soundTypeGlass, soundTypeGrass, soundTypeGravel, soundTypeLadder, soundTypeMetal, soundTypePiston, soundTypeSand, soundTypeSnow, soundTypeStone, soundTypeWood, stepSound, textureName, useNeighborBrightness`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BlockRailBase(boolean p_i45389_1_)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)`
    `boolean` | `canMakeSlopes(IBlockAccess world, int x, int y, int z)` Returns true if the rail can make up and down slopes.
    `boolean` | `canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)`
    `MovingObjectPosition` | `collisionRayTrace(World p_149731_1_, int p_149731_2_, int p_149731_3_, int p_149731_4_, Vec3 p_149731_5_, Vec3 p_149731_6_)`
    `protected void` | `func_150048_a(World p_150048_1_, int p_150048_2_, int p_150048_3_, int p_150048_4_, int p_150048_5_, int p_150048_6_, Block p_150048_7_)`
    `static boolean` | `func_150049_b_(World p_150049_0_, int p_150049_1_, int p_150049_2_, int p_150049_3_)`
    `static boolean` | `func_150051_a(Block p_150051_0_)`
    `protected void` | `func_150052_a(World p_150052_1_, int p_150052_2_, int p_150052_3_, int p_150052_4_, boolean p_150052_5_)`
    `int` | `getBasicRailMetadata(IBlockAccess world, EntityMinecart cart, int x, int y, int z)` Return the rail's metadata (without the power bit if the rail uses one).
    `AxisAlignedBB` | `getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)`
    `int` | `getMobilityFlag()`
    `float` | `getRailMaxSpeed(World world, EntityMinecart cart, int y, int x, int z)` Returns the max speed of the rail at the specified position.
    `int` | `getRenderType()`
    `boolean` | `isFlexibleRail(IBlockAccess world, int y, int x, int z)` Return true if the rail can make corners.
    `boolean` | `isOpaqueCube()`
    `boolean` | `isPowered()`
    `void` | `onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)`
    `void` | `onMinecartPass(World world, EntityMinecart cart, int y, int x, int z)` This function is called by any minecart that passes over this rail.
    `void` | `onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)`
    `int` | `quantityDropped(java.util.Random p_149745_1_)`
    `boolean` | `renderAsNormalBlock()`
    `void` | `setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_)`
    `void` | `setRenderType(int value)`

    - ### Methods inherited from class net.minecraft.block.Block

      `addCollisionBoxesToList, addDestroyEffects, addHitEffects, beginLeavesDecay, canBeReplacedByLeaves, canBlockStay, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInPass, canReplace, canSilkHarvest, canSilkHarvest, canSustainLeaves, canSustainPlant, captureDrops, colorMultiplier, createStackedBlock, createTileEntity, damageDropped, disableStats, dropBlockAsItem, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, fillWithRain, func_149698_L, func_149730_j, func_149735_b, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockById, getBlockColor, getBlockFromItem, getBlockFromName, getBlockHardness, getBlocksMovement, getBlockTextureFromSide, getCanBlockGrass, getComparatorInputOverride, getCreativeTabToDisplayOn, getDamageValue, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIcon, getIcon, getIdFromBlock, getItem, getItemDropped, getItemIconName, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMixedBrightnessForBlock, getPickBlock, getPlayerRelativeBlockHardness, getRenderBlockPass, getRenderColor, getSelectedBoundingBoxFromPool, getSubBlocks, getTextureName, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, harvestBlock, hasComparatorInputOverride, hasTileEntity, hasTileEntity, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBlockSolid, isBurning, isCollidable, isEqualTo, isFertile, isFireSource, isFlammable, isFlowerPot, isFoliage, isLadder, isLeaves, isNormalCube, isNormalCube, isProvidingStrongPower, isProvidingWeakPower, isReplaceable, isReplaceableOreGen, isSideSolid, isToolEffective, isWood, onBlockActivated, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockEventReceived, onBlockExploded, onBlockHarvested, onBlockPlaced, onBlockPlacedBy, onBlockPreDestroy, onEntityCollidedWithBlock, onEntityWalking, onFallenUpon, onNeighborChange, onPlantGrow, onPostBlockPlaced, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, recolourBlock, registerBlockIcons, registerBlocks, removedByPlayer, rotateBlock, setBedOccupied, setBlockBounds, setBlockBoundsForItemRender, setBlockName, setBlockTextureName, setBlockUnbreakable, setCreativeTab, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setStepSound, setTickRandomly, shouldCheckWeakPower, shouldSideBeRendered, tickRate, updateTick, velocityToAddToEntity`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### field_150053_a

          protected final boolean field_150053_a

  - ### Constructor Detail

    - #### BlockRailBase

          protected BlockRailBase(boolean p_i45389_1_)

  - ### Method Detail

    - #### func_150049_b_

          public static final boolean func_150049_b_(World p_150049_0_,
                               int p_150049_1_,
                               int p_150049_2_,
                               int p_150049_3_)

    - #### func_150051_a

          public static final boolean func_150051_a(Block p_150051_0_)

    - #### isPowered

          public boolean isPowered()

    - #### getCollisionBoundingBoxFromPool

          public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_,
                                                      int p_149668_2_,
                                                      int p_149668_3_,
                                                      int p_149668_4_)

      Overrides:
        `getCollisionBoundingBoxFromPool` in class `Block`

    - #### isOpaqueCube

          public boolean isOpaqueCube()

      Overrides:
        `isOpaqueCube` in class `Block`

    - #### collisionRayTrace

          public MovingObjectPosition collisionRayTrace(World p_149731_1_,
                                               int p_149731_2_,
                                               int p_149731_3_,
                                               int p_149731_4_,
                                               Vec3 p_149731_5_,
                                               Vec3 p_149731_6_)

      Overrides:
        `collisionRayTrace` in class `Block`

    - #### setBlockBoundsBasedOnState

          public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_,
                                        int p_149719_2_,
                                        int p_149719_3_,
                                        int p_149719_4_)

      Overrides:
        `setBlockBoundsBasedOnState` in class `Block`

    - #### renderAsNormalBlock

          public boolean renderAsNormalBlock()

      Overrides:
        `renderAsNormalBlock` in class `Block`

    - #### getRenderType

          public int getRenderType()

      Overrides:
        `getRenderType` in class `Block`

    - #### quantityDropped

          public int quantityDropped(java.util.Random p_149745_1_)

      Overrides:
        `quantityDropped` in class `Block`

    - #### canPlaceBlockAt

          public boolean canPlaceBlockAt(World p_149742_1_,
                                int p_149742_2_,
                                int p_149742_3_,
                                int p_149742_4_)

      Overrides:
        `canPlaceBlockAt` in class `Block`

    - #### onBlockAdded

          public void onBlockAdded(World p_149726_1_,
                          int p_149726_2_,
                          int p_149726_3_,
                          int p_149726_4_)

      Overrides:
        `onBlockAdded` in class `Block`

    - #### onNeighborBlockChange

          public void onNeighborBlockChange(World p_149695_1_,
                                   int p_149695_2_,
                                   int p_149695_3_,
                                   int p_149695_4_,
                                   Block p_149695_5_)

      Overrides:
        `onNeighborBlockChange` in class `Block`

    - #### func_150048_a

          protected void func_150048_a(World p_150048_1_,
                           int p_150048_2_,
                           int p_150048_3_,
                           int p_150048_4_,
                           int p_150048_5_,
                           int p_150048_6_,
                           Block p_150048_7_)

    - #### func_150052_a

          protected void func_150052_a(World p_150052_1_,
                           int p_150052_2_,
                           int p_150052_3_,
                           int p_150052_4_,
                           boolean p_150052_5_)

    - #### getMobilityFlag

          public int getMobilityFlag()

      Overrides:
        `getMobilityFlag` in class `Block`

    - #### breakBlock

          public void breakBlock(World p_149749_1_,
                        int p_149749_2_,
                        int p_149749_3_,
                        int p_149749_4_,
                        Block p_149749_5_,
                        int p_149749_6_)

      Overrides:
        `breakBlock` in class `Block`

    - #### isFlexibleRail

          public boolean isFlexibleRail(IBlockAccess world,
                               int y,
                               int x,
                               int z)

      Return true if the rail can make corners. Used by placement logic.
      Parameters:
        `world` - The world.
        `x` - The rail X coordinate.
        `y` - The rail Y coordinate.
        `z` - The rail Z coordinate.
      Returns:
        True if the rail can make corners.

    - #### canMakeSlopes

          public boolean canMakeSlopes(IBlockAccess world,
                              int x,
                              int y,
                              int z)

      Returns true if the rail can make up and down slopes. Used by placement logic.
      Parameters:
        `world` - The world.
        `x` - The rail X coordinate.
        `y` - The rail Y coordinate.
        `z` - The rail Z coordinate.
      Returns:
        True if the rail can make slopes.

    - #### getBasicRailMetadata

          public int getBasicRailMetadata(IBlockAccess world,
                                 EntityMinecart cart,
                                 int x,
                                 int y,
                                 int z)

      Return the rail's metadata (without the power bit if the rail uses one). Can be used to make the cart think the rail something other than it is, for example when making diamond junctions or switches. The cart parameter will often be null unless it it called from EntityMinecart. Valid rail metadata is defined as follows: 0x0: flat track going North-South 0x1: flat track going West-East 0x2: track ascending to the East 0x3: track ascending to the West 0x4: track ascending to the North 0x5: track ascending to the South 0x6: WestNorth corner (connecting East and South) 0x7: EastNorth corner (connecting West and South) 0x8: EastSouth corner (connecting West and North) 0x9: WestSouth corner (connecting East and North)
      Parameters:
        `world` - The world.
        `cart` - The cart asking for the metadata, null if it is not called by EntityMinecart.
        `y` - The rail X coordinate.
        `x` - The rail Y coordinate.
        `z` - The rail Z coordinate.
      Returns:
        The metadata.

    - #### getRailMaxSpeed

          public float getRailMaxSpeed(World world,
                              EntityMinecart cart,
                              int y,
                              int x,
                              int z)

      Returns the max speed of the rail at the specified position.
      Parameters:
        `world` - The world.
        `cart` - The cart on the rail, may be null.
        `x` - The rail X coordinate.
        `y` - The rail Y coordinate.
        `z` - The rail Z coordinate.
      Returns:
        The max speed of the current rail.

    - #### onMinecartPass

          public void onMinecartPass(World world,
                            EntityMinecart cart,
                            int y,
                            int x,
                            int z)

      This function is called by any minecart that passes over this rail. It is called once per update tick that the minecart is on the rail.
      Parameters:
        `world` - The world.
        `cart` - The cart on the rail.
        `y` - The rail X coordinate.
        `x` - The rail Y coordinate.
        `z` - The rail Z coordinate.

    - #### setRenderType

          public void setRenderType(int value)