Another MEGA COMMIT to Core Structure

This commit is contained in:
Kam committed 2026-03-13 21:10:30 -04:00
1 parent cb6e1ca386
commit 3a8b75f152
79 files changed
+4557 -96

No files matched your search

@@ -18,6 +18,7 @@ import noppes.npcs.api.handler.ITelegraphHandler;
import noppes.npcs.scripted.ScriptTelegraph;
import noppes.npcs.scripted.ScriptTelegraphInstance;
import noppes.npcs.util.NBTJsonUtil;
import noppes.npcs.wrapper.nbt.MC1710NBTCompound;
import java.io.File;
import java.util.HashMap;
@@ -252,7 +253,7 @@ public class TelegraphController implements ITelegraphHandler {
if (!file.isFile() || !file.getName().endsWith(".json")) continue;
try {
Telegraph telegraph = new Telegraph();
telegraph.readNBT(NBTJsonUtil.LoadFile(file));
telegraph.readNBT(new MC1710NBTCompound(NBTJsonUtil.LoadFile(file)));
String name = file.getName().substring(0, file.getName().length() - 5);
telegraph.setId(name);
savedTelegraphs.put(name, telegraph);
@@ -274,7 +275,7 @@ public class TelegraphController implements ITelegraphHandler {
File file = new File(dir, name + ".json_new");
File file2 = new File(dir, name + ".json");
NBTJsonUtil.SaveFile(file, telegraph.writeNBT());
NBTJsonUtil.SaveFile(file, ((MC1710NBTCompound) telegraph.writeNBT()).getMCTag());
if (file2.exists()) {
file2.delete();
}