public abstract class BlockRailBase extends Block
Modifier and Type | Class and Description |
---|---|
static class |
BlockRailBase.EnumRailDirection |
class |
BlockRailBase.Rail |
Block.EnumOffsetType
IForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>
Modifier and Type | Field and Description |
---|---|
protected static AxisAlignedBB |
ASCENDING_AABB |
protected static AxisAlignedBB |
FLAT_AABB |
protected boolean |
isPowered |
BLOCK_STATE_IDS, blockHardness, blockMapColor, blockMaterial, blockParticleGravity, blockResistance, blockSoundType, blockState, capturedDrops, captureDrops, enableStats, FULL_BLOCK_AABB, fullBlock, harvesters, isBlockContainer, lightOpacity, lightValue, needsRandomTick, NULL_AABB, RANDOM, REGISTRY, slipperiness, translucent, useNeighborBrightness
delegate
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) |
BlockRenderLayer |
getBlockLayer() |
AxisAlignedBB |
getBoundingBox(IBlockState state,
IBlockAccess source,
BlockPos pos) |
AxisAlignedBB |
getCollisionBoundingBox(IBlockState blockState,
World worldIn,
BlockPos pos) |
EnumPushReaction |
getMobilityFlag(IBlockState state) |
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(IBlockState state) |
boolean |
isOpaqueCube(IBlockState state) |
static boolean |
isRailBlock(IBlockState state) |
static boolean |
isRailBlock(World worldIn,
BlockPos pos) |
void |
neighborChanged(IBlockState state,
World worldIn,
BlockPos pos,
Block blockIn) |
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.
|
boolean |
rotateBlock(World world,
BlockPos pos,
EnumFacing axis)
Rotate the block.
|
protected IBlockState |
updateDir(World worldIn,
BlockPos pos,
IBlockState state,
boolean p_176564_4_) |
protected void |
updateState(IBlockState p_189541_1_,
World p_189541_2_,
BlockPos p_189541_3_,
Block p_189541_4_) |
addCollisionBoxToList, addCollisionBoxToList, addDestroyEffects, addHitEffects, addInformation, addLandingEffects, beginLeavesDecay, canBeReplacedByLeaves, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInLayer, canRenderInLayer, canReplace, canSilkHarvest, canSilkHarvest, canSpawnInBlock, canSustainLeaves, canSustainPlant, captureDrops, collisionRayTrace, createBlockState, createStackedBlock, createTileEntity, damageDropped, disableStats, doesSideBlockRendering, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, eventReceived, fillWithRain, getActualState, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockById, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockState, getComparatorInputOverride, getCreativeTabToDisplayOn, getDefaultState, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIdFromBlock, getItem, getItemDropped, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMetaFromState, getOffsetType, getPackedLightmapCoords, getPickBlock, getPlayerRelativeBlockHardness, getRenderType, getSelectedBoundingBox, getSoundType, getStateById, 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, isFoliage, isFullBlock, isFullyOpaque, isLadder, isLeaves, isNormalCube, isNormalCube, isPassable, isReplaceable, isReplaceableOreGen, isSideSolid, isToolEffective, isTranslucent, isVisuallyOpaque, isWood, modifyAcceleration, onBlockActivated, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockExploded, onBlockHarvested, onBlockPlaced, onBlockPlacedBy, onEntityCollidedWithBlock, onEntityWalk, onFallenUpon, onLanded, onNeighborChange, onPlantGrow, quantityDropped, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, randomTick, rayTrace, recolorBlock, registerBlocks, removedByPlayer, requiresUpdates, setBedOccupied, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setSoundType, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, shouldSideBeRendered, spawnAsEntity, tickRate, toString, updateTick, withMirror, withRotation
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
protected static final AxisAlignedBB FLAT_AABB
protected static final AxisAlignedBB ASCENDING_AABB
protected final boolean isPowered
public static boolean isRailBlock(IBlockState state)
@Nullable public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos)
getCollisionBoundingBox
in class Block
public boolean isOpaqueCube(IBlockState state)
isOpaqueCube
in class Block
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
getBoundingBox
in class Block
public boolean isFullCube(IBlockState state)
isFullCube
in class Block
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
canPlaceBlockAt
in class Block
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
onBlockAdded
in class Block
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn)
neighborChanged
in class Block
protected void updateState(IBlockState p_189541_1_, World p_189541_2_, BlockPos p_189541_3_, Block p_189541_4_)
protected IBlockState updateDir(World worldIn, BlockPos pos, IBlockState state, boolean p_176564_4_)
public EnumPushReaction getMobilityFlag(IBlockState state)
getMobilityFlag
in class Block
public BlockRenderLayer getBlockLayer()
getBlockLayer
in class Block
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
breakBlock
in class Block
public 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, @Nullable 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 Block
world
- The worldpos
- Block position in worldaxis
- The axis to rotate around