Open main menu
Home
Random
Log in
Settings
About Forge Community Wiki
Disclaimers
Forge Community Wiki
Search
Changes
← Older edit
Newer edit →
Codecs
(view source)
Revision as of 20:41, 6 August 2021
5 bytes removed
,
20:41, 6 August 2021
m
Fix incorrect name in pair codec example
Line 166:
Line 166:
Codec.STRING.fieldOf("name").codec());
Codec.STRING.fieldOf("name").codec());
−
JsonElement encodedPair =
BOXED_INT_CODEC
.encodeStart(JsonOps.INSTANCE, Pair.of(5, "cheese").result().get();
+
JsonElement encodedPair =
PAIR_CODEC
.encodeStart(JsonOps.INSTANCE, Pair.of(5, "cheese").result().get();
</syntaxhighlight>
</syntaxhighlight>
This codec serializes the above value to:
This codec serializes the above value to:
Commoble
22
edits