Package net.minecraft.block
Class RailPlacementHelper
java.lang.Object
net.minecraft.block.RailPlacementHelper
public class RailPlacementHelper extends Object
-
Field Summary
Fields Modifier and Type Field Description private boolean
allowCurves
private AbstractRailBlock
block
private List<BlockPos>
neighbors
private BlockPos
pos
private BlockState
state
private World
world
-
Constructor Summary
Constructors Constructor Description RailPlacementHelper(World world, BlockPos pos, BlockState state)
-
Method Summary
Modifier and Type Method Description private boolean
canConnect(RailPlacementHelper placementHelper)
private boolean
canConnect(BlockPos pos)
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(RailPlacementHelper other)
private boolean
isNeighbor(BlockPos pos)
private boolean
isVerticallyNearRail(BlockPos pos)
RailPlacementHelper
updateBlockState(boolean powered, boolean forceUpdate, RailShape railShape)
private void
updateNeighborPositions()
-
Field Details
-
world
-
pos
-
block
-
state
-
allowCurves
private final boolean allowCurves -
neighbors
-
-
Constructor Details
-
RailPlacementHelper
-
-
Method Details
-
getNeighbors
-
computeNeighbors
-
updateNeighborPositions
private void updateNeighborPositions() -
isVerticallyNearRail
-
getNeighboringRail
-
isNeighbor
-
isNeighbor
-
getNeighborCount
protected int getNeighborCount() -
canConnect
-
computeRailShape
-
canConnect
-
updateBlockState
public RailPlacementHelper updateBlockState(boolean powered, boolean forceUpdate, RailShape railShape) -
getBlockState
-