Conversation
|
What values in Vanilla will be composites? Is the intention here to represent the true data composition of the game? We expose several keys that are part of a composite in the backend but the composite isn't shown. Unless I misunderstand the intention here? |
|
The primary motive is vanish. So the key would be While the current state works kinda okay-ish because its a global on / off toggle, it becomes more complicated with contextual data where the state can be toggled per player per viewer. I view this as one of the prerequisites for contextual data. |
A
CompositeValue<K, E>consist a collection of key value pairs that are merged in to single a value. A single key value pair can be offer or removed from aDataProvider.A new
ValueLike<E>is introduced to separate the concept ofValue<E>which only truly holds a single value at given time. The newCompositeValue<K, E>only inherits fromValueLike<E>and existing overloads working with values won't accept composite values and they have their own overloads. This prevents users from erroneously constructing values that are not valid.TODO:
CompositeValue#Parentis currently valid, should this be disallowed?E. This contract is served byElementMergeFunction#Defaultedfor now.ValueLike#getto@Nullable? Can override inValue<T>.ValueLike#gettoOptional<E>? Can't override, a lot of churn for the user?DataProvider#Compositeserves this purpose currently. Offer and get works throughValueLike<E>.ElementMergeFunction?