DynamicOps

Revision as of 11:14, 25 October 2020 by Unbekannt (talk | contribs) (Inital Import dokuwiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

DynamicOps is a helper interface that's used to convert files into data types and vice versa. Their usages will probably never be explored by most modders. They are overshadowed by codecs.

NBTDynamicOps

NBTDynamicOps is a handler that converts an NBT file to an INBT tag. They are also used to parse information from codecs to send them across networks.

There is only one public instance of NBTDynamicOps: INSTANCE.

JsonOps

JsonOps are similar in which they convert a JSON file into a JsonElement. These are usually used in conjunction with codecs as well to serialize/deserialize instances.

There are two public instances of JsonOps: INSTANCE and COMPRESSED. Compressed data is represented as a single string to read/write. However, this is never used within vanilla itself.