Class TrackGraph
java.lang.Object
com.simibubi.create.content.logistics.trains.TrackGraph
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanaddNodeIfAbsent(TrackNode node) <T extends TrackEdgePoint>
voidaddPoint(EdgePointType<T> type, T point) voidconnectNodes(net.minecraft.world.level.LevelAccessor reader, TrackNodeLocation location, TrackNodeLocation location2, BezierConnection turn) booleanvoidvoiddisconnectNodes(TrackNode node1, TrackNode node2) floatdistanceToLocationSqr(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 location) findDisconnectedGraphs(net.minecraft.world.level.LevelAccessor level, Map<Integer, Pair<Integer, UUID>> splitSubGraphs) getBounds(net.minecraft.world.level.Level level) intgetConnection(Couple<TrackNode> nodes) getConnectionsFrom(TrackNode node) getNode(int netId) getNodes()<T extends TrackEdgePoint>
TgetPoint(EdgePointType<T> type, UUID id) <T extends TrackEdgePoint>
Collection<T>getPoints(EdgePointType<T> type) voidbooleanisEmpty()voidloadNode(TrackNodeLocation location, int netId, net.minecraft.world.phys.Vec3 normal) locateNode(TrackNodeLocation position) locateNode(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 position) voidstatic intstatic intbooleanputConnection(TrackNode node1, TrackNode node2, TrackEdge edge) static TrackGraphread(net.minecraft.nbt.CompoundTag tag, DimensionPalette dimensions) booleanremoveNode(net.minecraft.world.level.LevelAccessor level, TrackNodeLocation location) <T extends TrackEdgePoint>
TremovePoint(EdgePointType<T> type, UUID id) voidresolveIntersectingEdgeGroups(net.minecraft.world.level.Level level) voidvoidsetNetId(int id) voidtickPoints(boolean preTrains) voidtransfer(net.minecraft.world.level.LevelAccessor level, TrackNode node, TrackGraph target) voidtransferAll(TrackGraph toOther) net.minecraft.nbt.CompoundTagwrite(DimensionPalette dimensions)
-
Field Details
-
graphNetIdGenerator
-
nodeNetIdGenerator
-
id
-
color
-
-
Constructor Details
-
TrackGraph
public TrackGraph() -
TrackGraph
-
-
Method Details
-
addPoint
-
getPoint
-
getPoints
-
removePoint
-
tickPoints
public void tickPoints(boolean preTrains) -
getBounds
-
invalidateBounds
public void invalidateBounds() -
getNodes
-
locateNode
public TrackNode locateNode(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 position) -
locateNode
-
getNode
-
createNodeIfAbsent
-
loadNode
-
addNode
-
addNodeIfAbsent
-
removeNode
public boolean removeNode(@Nullable net.minecraft.world.level.LevelAccessor level, TrackNodeLocation location) -
nextNodeId
public static int nextNodeId() -
nextGraphId
public static int nextGraphId() -
transferAll
-
findDisconnectedGraphs
-
setId
-
setNetId
public void setNetId(int id) -
getChecksum
public int getChecksum() -
transfer
public void transfer(net.minecraft.world.level.LevelAccessor level, TrackNode node, TrackGraph target) -
isEmpty
public boolean isEmpty() -
getConnectionsFrom
-
getConnection
-
connectNodes
public void connectNodes(net.minecraft.world.level.LevelAccessor reader, TrackNodeLocation location, TrackNodeLocation location2, @Nullable BezierConnection turn) -
disconnectNodes
-
putConnection
-
distanceToLocationSqr
public float distanceToLocationSqr(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 location) -
deferIntersectionUpdate
-
resolveIntersectingEdgeGroups
public void resolveIntersectingEdgeGroups(net.minecraft.world.level.Level level) -
markDirty
public void markDirty() -
write
-
read
-