net.minecraft.block

public abstract class AbstractRailBlock

extends Block implements Waterloggable

All mapped superinterfaces:

ToggleableFeature, ItemConvertible, Waterloggable, FluidDrainable, FluidFillable

net.minecraft.world.level.block.BaseRailBlock
net.minecraft.class_2241
net.minecraft.block.AbstractRailBlock

Field summary

Modifier and TypeField
public static final BooleanProperty
WATERLOGGED
field_27096
WATERLOGGED
private static final VoxelShape
SHAPE_FLAT
field_9958
STRAIGHT_SHAPE
private static final VoxelShape
SHAPE_SLOPE
field_9960
ASCENDING_SHAPE
private final boolean
isStraight
field_9959
forbidCurves

Constructor summary

ModifierConstructor
protected (boolean forbidCurves, AbstractBlock$Settings settings)

Method summary

Modifier and TypeMethod
public static boolean
isRail(Level level, BlockPos pos)
method_9479(class_1937 arg0, class_2338 arg1)
isRail(World world, BlockPos pos)
public static boolean
isRail(BlockState state)
method_9476(class_2680 arg0)
isRail(BlockState state)
protected abstract com.mojang.serialization.MapCodec<? extends AbstractRailBlock>
codec()
method_53969()
getCodec()
public boolean
isStraight()
method_9478()
cannotMakeCurves()
protected VoxelShape
getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context)
method_9530(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_3726 arg3)
getOutlineShape(BlockState arg0, BlockView arg1, BlockPos arg2, ShapeContext arg3)
protected boolean
canSurvive(BlockState state, LevelReader level, BlockPos pos)
method_9558(class_2680 arg0, class_4538 arg1, class_2338 arg2)
canPlaceAt(BlockState arg0, WorldView arg1, BlockPos arg2)
protected void
onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston)
method_9615(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2680 arg3, boolean arg4)
onBlockAdded(BlockState arg0, World arg1, BlockPos arg2, BlockState arg3, boolean arg4)
protected BlockState
updateState(BlockState state, Level level, BlockPos pos, boolean movedByPiston)
method_24417(class_2680 arg0, class_1937 arg1, class_2338 arg2, boolean arg3)
updateCurves(BlockState state, World world, BlockPos pos, boolean notify)
protected void
neighborChanged(BlockState state, Level level, BlockPos pos, Block block, Orientation orientation, boolean movedByPiston)
method_9612(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2248 arg3, class_9904 arg4, boolean arg5)
neighborUpdate(BlockState arg0, World arg1, BlockPos arg2, Block arg3, WireOrientation arg4, boolean arg5)
private static boolean
shouldBeRemoved(BlockPos pos, Level level, RailShape shape)
method_27935(class_2338 arg0, class_1937 arg1, class_2768 arg2)
shouldDropRail(BlockPos pos, World world, RailShape shape)
protected void
updateState(BlockState state, Level level, BlockPos pos, Block block)
method_9477(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2248 arg3)
updateBlockState(BlockState state, World world, BlockPos pos, Block neighbor)
protected BlockState
updateDir(Level level, BlockPos pos, BlockState state, boolean first)
method_9475(class_1937 arg0, class_2338 arg1, class_2680 arg2, boolean arg3)
updateBlockState(World world, BlockPos pos, BlockState state, boolean forceUpdate)
protected void
affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston)
method_66388(class_2680 arg0, class_3218 arg1, class_2338 arg2, boolean arg3)
onStateReplaced(BlockState arg0, ServerWorld arg1, BlockPos arg2, boolean arg3)
public BlockState
getStateForPlacement(BlockPlaceContext context)
method_9605(class_1750 arg0)
getPlacementState(ItemPlacementContext arg0)
public abstract Property<RailShape>
getShapeProperty()
method_9474()
getShapeProperty()
protected RailShape
rotate(RailShape shape, Rotation rotation)
method_71014(class_2768 arg0, class_2470 arg1)
rotateShape(RailShape shape, BlockRotation rotation)
protected RailShape
mirror(RailShape shape, Mirror mirror)
method_71013(class_2768 arg0, class_2415 arg1)
mirrorShape(RailShape shape, BlockMirror mirror)
protected BlockState
updateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random)
method_9559(class_2680 arg0, class_4538 arg1, class_10225 arg2, class_2338 arg3, class_2350 arg4, class_2338 arg5, class_2680 arg6, class_5819 arg7)
getStateForNeighborUpdate(BlockState arg0, WorldView arg1, ScheduledTickView arg2, BlockPos arg3, Direction arg4, BlockPos arg5, BlockState arg6, Random arg7)
protected FluidState
getFluidState(BlockState state)
method_9545(class_2680 arg0)
getFluidState(BlockState arg0)