Package net.minecraft.block
Class RailState
- java.lang.Object
-
- net.minecraft.block.RailState
-
public class RailState extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private AbstractRailBlock
block
private boolean
canMakeSlopes
private java.util.List<BlockPos>
connections
private boolean
isStraight
private World
level
private BlockPos
pos
private BlockState
state
-
Constructor Summary
Constructors Constructor Description RailState(World p_i47755_1_, BlockPos p_i47755_2_, BlockState p_i47755_3_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
canConnectTo(RailState p_196905_1_)
private boolean
connectsTo(RailState p_196919_1_)
private void
connectTo(RailState p_208510_1_)
protected int
countPotentialConnections()
java.util.List<BlockPos>
getConnections()
private RailState
getRail(BlockPos p_196908_1_)
BlockState
getState()
private boolean
hasConnection(BlockPos p_196904_1_)
private boolean
hasNeighborRail(BlockPos p_208512_1_)
private boolean
hasRail(BlockPos p_196902_1_)
RailState
place(boolean p_226941_1_, boolean p_226941_2_, RailShape p_226941_3_)
private void
removeSoftConnections()
private void
updateConnections(RailShape p_208509_1_)
-
-
-
Field Detail
-
level
private final World level
-
pos
private final BlockPos pos
-
block
private final AbstractRailBlock block
-
state
private BlockState state
-
isStraight
private final boolean isStraight
-
connections
private final java.util.List<BlockPos> connections
-
canMakeSlopes
private final boolean canMakeSlopes
-
-
Constructor Detail
-
RailState
public RailState(World p_i47755_1_, BlockPos p_i47755_2_, BlockState p_i47755_3_)
-
-
Method Detail
-
getConnections
public java.util.List<BlockPos> getConnections()
-
updateConnections
private void updateConnections(RailShape p_208509_1_)
-
removeSoftConnections
private void removeSoftConnections()
-
hasRail
private boolean hasRail(BlockPos p_196902_1_)
-
connectsTo
private boolean connectsTo(RailState p_196919_1_)
-
hasConnection
private boolean hasConnection(BlockPos p_196904_1_)
-
countPotentialConnections
protected int countPotentialConnections()
-
canConnectTo
private boolean canConnectTo(RailState p_196905_1_)
-
connectTo
private void connectTo(RailState p_208510_1_)
-
hasNeighborRail
private boolean hasNeighborRail(BlockPos p_208512_1_)
-
getState
public BlockState getState()
-
-