T
- The type of data structure to translate to and frompublic interface DataTranslator<T>
DataView
s into other types of data structures
for various uses, such as configurate's configuration node, or for implementation with
NBT.Modifier and Type | Method and Description |
---|---|
void |
translateContainerToData(T node,
DataView container)
Translates the given
DataView into the given data structure. |
T |
translateData(DataView container)
Translates the given
DataView into the type of data structure. |
DataView |
translateFrom(T node)
Translates the given data structure into a usable
DataView that
can be used with the rest of DataAPI. |
T translateData(DataView container)
DataView
into the type of data structure.container
- The container to translatevoid translateContainerToData(T node, DataView container)
DataView
into the given data structure.
This assumes that the given data structure will be the top level node
of the data contained in the DataView
.
node
- The node to store datacontainer
- The container of data to translate