public abstract class AbstractRailBlock extends Block
Block.OffsetType, Block.Properties, Block.RenderSideCacheKey
Modifier and Type | Field and Description |
---|---|
protected static VoxelShape |
ASCENDING_AABB |
protected static VoxelShape |
FLAT_AABB |
BLOCK_STATE_IDS, blockHardness, blockResistance, blocksMovement, lightValue, LOGGER, material, materialColor, RANDOM, soundType, stateContainer, ticksRandomly
delegate
Modifier | Constructor and Description |
---|---|
protected |
AbstractRailBlock(boolean p_i48444_1_,
Block.Properties p_i48444_2_) |
Modifier and Type | Method and Description |
---|---|
boolean |
areCornersDisabled() |
boolean |
canMakeSlopes(BlockState state,
IBlockReader world,
BlockPos pos)
Returns true if the rail can make up and down slopes.
|
PushReaction |
getPushReaction(BlockState state) |
RailShape |
getRailDirection(BlockState state,
IBlockReader world,
BlockPos pos,
AbstractMinecartEntity cart)
Return the rail's direction.
|
float |
getRailMaxSpeed(BlockState state,
World world,
BlockPos pos,
AbstractMinecartEntity cart)
Returns the max speed of the rail at the specified position.
|
BlockRenderLayer |
getRenderLayer() |
VoxelShape |
getShape(BlockState state,
IBlockReader worldIn,
BlockPos pos,
ISelectionContext context) |
abstract IProperty<RailShape> |
getShapeProperty() |
protected BlockState |
getUpdatedState(World p_208489_1_,
BlockPos p_208489_2_,
BlockState p_208489_3_,
boolean placing) |
boolean |
isFlexibleRail(BlockState state,
IBlockReader world,
BlockPos pos)
Return true if the rail can make corners.
|
static boolean |
isRail(BlockState p_208487_0_) |
static boolean |
isRail(World p_208488_0_,
BlockPos p_208488_1_) |
boolean |
isValidPosition(BlockState state,
IWorldReader worldIn,
BlockPos pos) |
void |
neighborChanged(BlockState state,
World worldIn,
BlockPos pos,
Block blockIn,
BlockPos fromPos,
boolean isMoving) |
void |
onBlockAdded(BlockState state,
World worldIn,
BlockPos pos,
BlockState oldState,
boolean isMoving) |
void |
onMinecartPass(BlockState state,
World world,
BlockPos pos,
AbstractMinecartEntity cart)
This function is called by any minecart that passes over this rail.
|
void |
onReplaced(BlockState state,
World worldIn,
BlockPos pos,
BlockState newState,
boolean isMoving) |
protected void |
updateState(BlockState state,
World worldIn,
BlockPos pos,
Block blockIn) |
addInformation, allowsMovement, animateTick, asItem, canDropFromExplosion, canEntitySpawn, cannotAttach, canProvidePower, canSpawnInBlock, canSustainPlant, causesSuffocation, doesSideFillSquare, dropXpOnBlockBreak, eventReceived, fillItemGroup, fillStateContainer, fillWithRain, func_220055_a, func_220064_c, func_220074_n, func_220080_a, getBlockFromItem, getBlockHardness, getCollisionShape, getComparatorInputOverride, getContainer, getDefaultState, getDrops, getDrops, getDrops, getExplosionResistance, getFluidState, getHarvestLevel, getHarvestTool, getItem, getLightValue, getLootTable, getMaterial, getMaterialColor, getNameTextComponent, getOffset, getOffsetType, getOpacity, getPackedLightmapCoords, getPlayerRelativeBlockHardness, getPositionRandom, getRaytraceShape, getRenderShape, getRenderType, getSlipperiness, getSlipperiness, getSoundType, getStateById, getStateContainer, getStateForPlacement, getStateId, getStrongPower, getTags, getTranslationKey, getValidBlockForPosition, getWeakPower, harvestBlock, hasComparatorInputOverride, hasCustomBreakingProgress, hasSolidSide, hasTileEntity, isAir, isDirt, isIn, isNormalCube, isOpaque, isOpaqueCube, isReplaceable, isRock, isSideInvisible, isSolid, isVariableOpacity, makeCuboidShape, mirror, needsPostProcessing, nudgeEntitiesWithNewState, onBlockActivated, onBlockClicked, onBlockHarvested, onBlockPlacedBy, onEntityCollision, onEntityWalk, onExplosionDestroy, onFallenUpon, onLanded, onPlayerDestroy, onProjectileCollision, propagatesSkylightDown, randomTick, replaceBlock, rotate, setDefaultState, shouldSideBeRendered, spawnAdditionalDrops, spawnAsEntity, spawnDrops, spawnDrops, spawnDrops, spawnDrops, tick, tickRate, ticksRandomly, toString, updateDiagonalNeighbors, updateNeighbors, updatePostPlacement
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, beginLeaveDecay, canBeConnectedTo, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canRenderInLayer, catchFire, collisionExtendsVertically, createTileEntity, doesSideBlockRendering, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRayTraceResult, getSoundType, getStateAtViewpoint, getStateForPlacement, getValidRotations, getWeakChanges, hasTileEntity, isAir, isBeaconBase, isBed, isBedFoot, isBurning, isFertile, isFireSource, isFlammable, isFoliage, isLadder, isPortalFrame, isReplaceableOreGen, isStickyBlock, isToolEffective, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, recolorBlock, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower
protected static final VoxelShape FLAT_AABB
protected static final VoxelShape ASCENDING_AABB
protected AbstractRailBlock(boolean p_i48444_1_, Block.Properties p_i48444_2_)
public static boolean isRail(BlockState p_208487_0_)
public boolean areCornersDisabled()
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context)
public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos)
isValidPosition
in class Block
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving)
onBlockAdded
in class Block
public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, boolean isMoving)
neighborChanged
in class Block
protected void updateState(BlockState state, World worldIn, BlockPos pos, Block blockIn)
protected BlockState getUpdatedState(World p_208489_1_, BlockPos p_208489_2_, BlockState p_208489_3_, boolean placing)
public PushReaction getPushReaction(BlockState state)
getPushReaction
in class Block
public BlockRenderLayer getRenderLayer()
getRenderLayer
in class Block
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving)
onReplaced
in class Block
public boolean isFlexibleRail(BlockState state, IBlockReader world, BlockPos pos)
world
- The world.pos
- Block's position in worldpublic boolean canMakeSlopes(BlockState state, IBlockReader world, BlockPos pos)
world
- The world.pos
- Block's position in worldpublic RailShape getRailDirection(BlockState state, IBlockReader world, BlockPos pos, @Nullable AbstractMinecartEntity 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(BlockState state, World world, BlockPos pos, AbstractMinecartEntity cart)
world
- The world.cart
- The cart on the rail, may be null.pos
- Block's position in worldpublic void onMinecartPass(BlockState state, World world, BlockPos pos, AbstractMinecartEntity cart)
world
- The world.cart
- The cart on the rail.pos
- Block's position in world