Custom Subsets in config; RecipeId Command (#691)

Co-authored-by: koolkrafter5 <[email protected]>
This commit is contained in:
slprimeandkoolkrafter5 authored and GitHub committed 2025-08-16 18:56:59 +07:00
1 parent 6dcd26a978
commit 57e865fc6f
17 files changed
+496 -33

No files matched your search

@@ -43,12 +43,10 @@ public class NBTJson {
// NBTTagCompound
final NBTTagCompound nbtTagCompound = (NBTTagCompound) nbt;
final Map<String, NBTBase> tagMap = (Map<String, NBTBase>) nbtTagCompound.tagMap;
final JsonObject root = new JsonObject();
JsonObject root = new JsonObject();
for (Map.Entry<String, NBTBase> nbtEntry : tagMap.entrySet()) {
root.add(nbtEntry.getKey(), toJsonObject(nbtEntry.getValue()));
}
tagMap.entrySet().stream().sorted(Map.Entry.<String, NBTBase>comparingByKey())
.forEach(nbtEntry -> { root.add(nbtEntry.getKey(), toJsonObject(nbtEntry.getValue())); });
return root;
} else if (nbt instanceof NBTTagByte) {