public class NodeOperations
extends java.lang.Object
| Constructor and Description |
|---|
NodeOperations() |
| Modifier and Type | Method and Description |
|---|---|
static void |
mergeTo(ConfigValue<?> value,
ConfigNodeBuilder to)
Merges a leaf node (
ConfigValue) into a ConfigNode. |
static void |
mergeTo(NodeLike from,
ConfigNodeBuilder to)
Merges two
ConfigNode objects. |
static <T> void |
mergeTo(Property<T> from,
Property<T> to) |
public static void mergeTo(NodeLike from, ConfigNodeBuilder to)
ConfigNode objects.
The first parameter from remains unchanged, but to will be mutated and receive all of from's children.
If both nodes have one or more children with the same name, the child from from takes priority.
from - The ConfigNode that will be read from, but not mutated.to - The mutated ConfigNode that will inherit from's values and nodes.public static void mergeTo(ConfigValue<?> value, ConfigNodeBuilder to)
ConfigValue) into a ConfigNode.value - The leaf node to be inheritedto - The mutated ConfigNode that will inherit value