public abstract class BlockRailBase extends Block
| Modifier and Type | Class and Description |
|---|---|
static class |
BlockRailBase.EnumRailDirection |
class |
BlockRailBase.Rail |
Block.EnumOffsetType, Block.SoundType| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isPowered |
BLOCK_STATE_IDS, blockHardness, blockMaterial, blockParticleGravity, blockRegistry, blockResistance, blockState, capturedDrops, captureDrops, delegate, enableStats, field_181083_K, fullBlock, harvesters, isBlockContainer, lightOpacity, lightValue, maxX, maxY, maxZ, minX, minY, minZ, needsRandomTick, RANDOM, SLIME_SOUND, slipperiness, soundTypeAnvil, soundTypeCloth, soundTypeGlass, soundTypeGrass, soundTypeGravel, soundTypeLadder, soundTypeMetal, soundTypePiston, soundTypeSand, soundTypeSnow, soundTypeStone, soundTypeWood, stepSound, translucent, useNeighborBrightness| Modifier | Constructor and Description |
|---|---|
protected |
BlockRailBase(boolean isPowered) |
| Modifier and Type | Method and Description |
|---|---|
void |
breakBlock(World worldIn,
BlockPos pos,
IBlockState state) |
boolean |
canMakeSlopes(IBlockAccess world,
BlockPos pos)
Returns true if the rail can make up and down slopes.
|
boolean |
canPlaceBlockAt(World worldIn,
BlockPos pos) |
MovingObjectPosition |
collisionRayTrace(World worldIn,
BlockPos pos,
Vec3 start,
Vec3 end)
Ray traces through the blocks collision from start vector to end vector returning a ray trace hit.
|
protected IBlockState |
func_176564_a(World worldIn,
BlockPos p_176564_2_,
IBlockState p_176564_3_,
boolean p_176564_4_) |
EnumWorldBlockLayer |
getBlockLayer() |
AxisAlignedBB |
getCollisionBoundingBox(World worldIn,
BlockPos pos,
IBlockState state) |
int |
getMobilityFlag() |
BlockRailBase.EnumRailDirection |
getRailDirection(IBlockAccess world,
BlockPos pos,
IBlockState state,
EntityMinecart cart)
Return the rail's direction.
|
float |
getRailMaxSpeed(World world,
EntityMinecart cart,
BlockPos pos)
Returns the max speed of the rail at the specified position.
|
abstract IProperty<BlockRailBase.EnumRailDirection> |
getShapeProperty() |
boolean |
isFlexibleRail(IBlockAccess world,
BlockPos pos)
Return true if the rail can make corners.
|
boolean |
isFullCube() |
boolean |
isOpaqueCube()
Used to determine ambient occlusion and culling when rebuilding chunks for render
|
static boolean |
isRailBlock(IBlockState state) |
static boolean |
isRailBlock(World worldIn,
BlockPos pos) |
void |
onBlockAdded(World worldIn,
BlockPos pos,
IBlockState state) |
void |
onMinecartPass(World world,
EntityMinecart cart,
BlockPos pos)
This function is called by any minecart that passes over this rail.
|
void |
onNeighborBlockChange(World worldIn,
BlockPos pos,
IBlockState state,
Block neighborBlock)
Called when a neighboring block changes.
|
protected void |
onNeighborChangedInternal(World worldIn,
BlockPos pos,
IBlockState state,
Block neighborBlock) |
boolean |
rotateBlock(World world,
BlockPos pos,
EnumFacing axis)
Rotate the block.
|
void |
setBlockBoundsBasedOnState(IBlockAccess worldIn,
BlockPos pos) |
addCollisionBoxesToList, addDestroyEffects, addHitEffects, addLandingEffects, beginLeavesDecay, canBeReplacedByLeaves, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInLayer, canReplace, canSilkHarvest, canSilkHarvest, canSustainLeaves, canSustainPlant, captureDrops, colorMultiplier, colorMultiplier, createBlockState, createStackedBlock, createTileEntity, damageDropped, disableStats, doesSideBlockRendering, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, fillWithRain, func_181623_g, getActualState, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockById, getBlockColor, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockState, getComparatorInputOverride, getCreativeTabToDisplayOn, getDamageValue, getDefaultState, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIdFromBlock, getItem, getItemDropped, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMetaFromState, getMixedBrightnessForBlock, getOffsetType, getPickBlock, getPickBlock, getPlayerRelativeBlockHardness, getRegistryName, getRenderColor, getRenderType, getSelectedBoundingBox, getStateById, getStateForEntityRender, getStateFromMeta, getStateId, getStrongPower, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, getWeakPower, harvestBlock, hasComparatorInputOverride, hasTileEntity, hasTileEntity, isAABBInsideMaterial, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBlockSolid, isBurning, isCollidable, isEntityInsideMaterial, isEqualTo, isFertile, isFireSource, isFlammable, isFlowerPot, isFoliage, isFullBlock, isLadder, isLeaves, isNormalCube, isNormalCube, isPassable, isReplaceable, isReplaceableOreGen, isSideSolid, isToolEffective, isTranslucent, isVisuallyOpaque, isWood, modifyAcceleration, onBlockActivated, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockEventReceived, onBlockExploded, onBlockHarvested, onBlockPlaced, onBlockPlacedBy, onEntityCollidedWithBlock, onEntityCollidedWithBlock, onFallenUpon, onLanded, onNeighborChange, onPlantGrow, quantityDropped, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, randomTick, recolorBlock, registerBlocks, removedByPlayer, requiresUpdates, setBedOccupied, setBlockBounds, setBlockBoundsForItemRender, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setRegistryName, setRegistryName, setRegistryName, setResistance, setStepSound, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, shouldSideBeRendered, spawnAsEntity, tickRate, toString, updateTickpublic static boolean isRailBlock(IBlockState state)
public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state)
getCollisionBoundingBox in class Blockpublic boolean isOpaqueCube()
isOpaqueCube in class Blockpublic MovingObjectPosition collisionRayTrace(World worldIn, BlockPos pos, Vec3 start, Vec3 end)
collisionRayTrace in class Blockpublic void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos)
setBlockBoundsBasedOnState in class Blockpublic boolean isFullCube()
isFullCube in class Blockpublic boolean canPlaceBlockAt(World worldIn, BlockPos pos)
canPlaceBlockAt in class Blockpublic void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
onBlockAdded in class Blockpublic void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock)
onNeighborBlockChange in class Blockprotected void onNeighborChangedInternal(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock)
protected IBlockState func_176564_a(World worldIn, BlockPos p_176564_2_, IBlockState p_176564_3_, boolean p_176564_4_)
public int getMobilityFlag()
getMobilityFlag in class Blockpublic EnumWorldBlockLayer getBlockLayer()
getBlockLayer in class Blockpublic void breakBlock(World worldIn, BlockPos pos, IBlockState state)
breakBlock in class Blockpublic abstract IProperty<BlockRailBase.EnumRailDirection> getShapeProperty()
public boolean isFlexibleRail(IBlockAccess world, BlockPos pos)
world - The world.pos - Block's position in worldpublic boolean canMakeSlopes(IBlockAccess world, BlockPos pos)
world - The world.pos - Block's position in worldpublic BlockRailBase.EnumRailDirection getRailDirection(IBlockAccess world, BlockPos pos, IBlockState state, EntityMinecart cart)
world - The world.pos - Block's position in worldstate - The BlockStatecart - The cart asking for the metadata, null if it is not called by EntityMinecart.public float getRailMaxSpeed(World world, EntityMinecart cart, BlockPos pos)
world - The world.cart - The cart on the rail, may be null.pos - Block's position in worldpublic void onMinecartPass(World world, EntityMinecart cart, BlockPos pos)
world - The world.cart - The cart on the rail.pos - Block's position in worldpublic boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
rotateBlock in class Blockworld - The worldpos - Block position in worldaxis - The axis to rotate around