public class RailPlacementHelper extends Object
Modifier and Type | Field and Description |
---|---|
private boolean |
allowCurves |
private AbstractRailBlock |
block |
private List<BlockPos> |
neighbors |
private BlockPos |
pos |
private BlockState |
state |
private World |
world |
Constructor and Description |
---|
RailPlacementHelper(World world,
BlockPos pos,
BlockState state) |
Modifier and Type | Method and Description |
---|---|
private boolean |
canConnect(BlockPos pos) |
private boolean |
canConnect(RailPlacementHelper placementHelper) |
private void |
computeNeighbors(RailShape shape) |
private void |
computeRailShape(RailPlacementHelper placementHelper) |
BlockState |
getBlockState() |
protected int |
getNeighborCount() |
private RailPlacementHelper |
getNeighboringRail(BlockPos pos) |
List<BlockPos> |
getNeighbors() |
private boolean |
isNeighbor(BlockPos pos) |
private boolean |
isNeighbor(RailPlacementHelper other) |
private boolean |
isVerticallyNearRail(BlockPos pos) |
RailPlacementHelper |
updateBlockState(boolean powered,
boolean forceUpdate,
RailShape railShape) |
private void |
updateNeighborPositions() |
private final World world
private final BlockPos pos
private final AbstractRailBlock block
private BlockState state
private final boolean allowCurves
public RailPlacementHelper(World world, BlockPos pos, BlockState state)
private void computeNeighbors(RailShape shape)
private void updateNeighborPositions()
private boolean isVerticallyNearRail(BlockPos pos)
@Nullable private RailPlacementHelper getNeighboringRail(BlockPos pos)
private boolean isNeighbor(RailPlacementHelper other)
private boolean isNeighbor(BlockPos pos)
protected int getNeighborCount()
private boolean canConnect(RailPlacementHelper placementHelper)
private void computeRailShape(RailPlacementHelper placementHelper)
private boolean canConnect(BlockPos pos)
public RailPlacementHelper updateBlockState(boolean powered, boolean forceUpdate, RailShape railShape)
public BlockState getBlockState()