Changes

983 bytes added ,  11:14, 25 October 2020
Inital Import dokuwiki
<code>DynamicOps</code> 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 [[latest:advanced:handle:codecs|codecs]].

== <code>NBTDynamicOps</code> ==

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

There is only one public instance of <code>NBTDynamicOps</code>: <code>INSTANCE</code>.

== <code>JsonOps</code> ==

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

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