-
Notifications
You must be signed in to change notification settings - Fork 77
5.1 Tunnel Graph Structure
Ted Senft edited this page Jul 9, 2023
·
1 revision
Memory Graph Structure:
flowchart
TN(TunnelNode)
TTN(TunnelTypeNode)
CMN(CompactMachineNode)
TN -- TunnelTypeEdge --> TTN
TN -- TunnelMachineEdge --> CMN
- graph:
CompoundTag- edges:
List<IGraphEdge> | ListTag<CompoundTag> - nodes:
List<IGraphNode> | ListTag<CompoundTag>
- edges:
The following is the general structure of a node:
| field | type | description |
|---|---|---|
| id | UUID |
|
| data | CompoundTag |
Node data, from encoding with the node's codec. |
| field | type | value |
|---|---|---|
| type | ResourceLocation |
compactmachines:tunnel |
| pos | BlockPos |
| field | type | value |
|---|---|---|
| type | ResourceLocation |
compactmachines:machine |
| dimension | ResourceKey<Level> |
|
| position | BlockPos |
| field | type | value |
|---|---|---|
| type | ResourceLocation |
compactmachines:tunnel_type |
| tunnel_type | ResourceLocation |
In addition to the edge data, stored in data as a CompoundTag, the following is stored for every edge:
| field | type | description |
|---|---|---|
| from | UUID |
The UUID of the edge origin node. (U) |
| to | UUID |
The UUID of the edge target node. (V) |
| data | CompoundTag |
Edge data, from encoding with the edge's codec. |
| field | type | value |
|---|---|---|
| type | ResourceLocation |
compactmachines:tunnel_machine |
| side | Direction |
| field | type | value |
|---|---|---|
| type | ResourceLocation |
compactmachines:tunnel_type |