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 booleanallowCurvesprivate AbstractRailBlockblockprivate List<BlockPos>neighborsprivate BlockPosposprivate BlockStatestateprivate Worldworld -
Constructor Summary
Constructors Constructor Description RailPlacementHelper(World world, BlockPos pos, BlockState state) -
Method Summary
Modifier and Type Method Description private booleancanConnect(RailPlacementHelper placementHelper)private booleancanConnect(BlockPos pos)private voidcomputeNeighbors(RailShape shape)private voidcomputeRailShape(RailPlacementHelper placementHelper)BlockStategetBlockState()protected intgetNeighborCount()private RailPlacementHelpergetNeighboringRail(BlockPos pos)List<BlockPos>getNeighbors()private booleanisNeighbor(RailPlacementHelper other)private booleanisNeighbor(BlockPos pos)private booleanisVerticallyNearRail(BlockPos pos)RailPlacementHelperupdateBlockState(boolean powered, boolean forceUpdate, RailShape railShape)private voidupdateNeighborPositions()
-
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
-