TreeRegistry¶
class TreeRegistry<K : Any, V, B : NodeBuilder<K, V, B>>
tree's own return value - every TreeNode it declared, addressable by TreeNode.id via get, reachable structurally from roots. Backed by Compose state throughout.
Properties¶
roots¶
Every top-level TreeScope.node call in the tree that built this registry.
Functions¶
get¶
The node registered under id, or null if none was.
saveToTag¶
Serializes every TreeNode this TreeRegistry holds into a CompoundTag - node id/data via keySerializer/dataSerializer, plus each node's own TreeNode.children/TreeNode.parents ids and the registry's own TreeRegistry.roots. See loadTree for the reverse.
Reified convenience over TreeRegistry.saveToTag resolving K/V's own serializers via SerializationManager.module.