Wrapper Naming Improvement Scheme

This commit is contained in:
Kam committed 2026-03-13 21:26:54 -04:00
1 parent 3a8b75f152
commit 11a4d0b61d
94 files changed
+558 -370

No files matched your search

@@ -36,7 +36,7 @@ public class ProjectileData {
}
public void writeNBT(INBTCompound nbt) {
// OLD: anchor.writeNBT(new MC1710NBTCompound(nbt));
// OLD: anchor.writeNBT(new NBTWrapper(nbt));
anchor.writeNBT(nbt);
nbt.setBoolean("colorOverride", colorOverride);
if (colorOverride) {
@@ -46,7 +46,7 @@ public class ProjectileData {
}
public void readNBT(INBTCompound nbt) {
// OLD: anchor.readNBT(new MC1710NBTCompound(nbt));
// OLD: anchor.readNBT(new NBTWrapper(nbt));
anchor.readNBT(nbt);
colorOverride = nbt.getBoolean("colorOverride");
if (colorOverride) {
@@ -207,7 +207,7 @@ public class MagicController {
for (int i = 0; i < cycleList.size(); i++) {
INBTCompound catCompound = cycleList.getCompound(i);
MagicCycle cycle = new MagicCycle();
// OLD: cycle.readNBT(new MC1710NBTCompound(catCompound));
// OLD: cycle.readNBT(new NBTWrapper(catCompound));
cycle.readNBT(catCompound);
cycles.put(cycle.id, cycle);
}
@@ -223,7 +223,7 @@ public class MagicController {
INBTList catList = NBT.list();
for (MagicCycle cat : cycles.values()) {
INBTCompound catCompound = NBT.compound();
// OLD: cat.writeNBT(new MC1710NBTCompound(catCompound));
// OLD: cat.writeNBT(new NBTWrapper(catCompound));
cat.writeNBT(catCompound);
catList.addCompound(catCompound);
}
@@ -341,7 +341,7 @@ public class MagicController {
// TODO: mc1710 version also calls:
// OLD: NBTTagCompound cycleCompound = new NBTTagCompound();
// OLD: cycle.writeNBT(new MC1710NBTCompound(cycleCompound));
// OLD: cycle.writeNBT(new NBTWrapper(cycleCompound));
// OLD: SyncController.syncUpdate(EnumSyncType.MAGIC_CYCLE, -1, cycleCompound);
saveMagicData();
@@ -56,7 +56,7 @@ public class ServerTagMapController {
private void loadTagMapFile(File file) throws Exception {
// OLD: DataInputStream var1 = new DataInputStream(new BufferedInputStream(new GZIPInputStream(new FileInputStream(file))));
// OLD: NBTTagCompound nbtCompound = CompressedStreamTools.read(var1);
// OLD: this.tagMap.readNBT(new MC1710NBTCompound(nbtCompound));
// OLD: this.tagMap.readNBT(new NBTWrapper(nbtCompound));
// OLD: var1.close();
INBTCompound nbtCompound = PlatformServiceHolder.get().readCompressedNBT(file);
this.tagMap.readNBT(nbtCompound);
@@ -92,7 +92,7 @@ public class ServerTagMapController {
File file = new File(saveDir, "___tagmap.dat_new");
File file1 = new File(saveDir, "___tagmap.dat_old");
File file2 = new File(saveDir, "___tagmap.dat");
// OLD: CompressedStreamTools.writeCompressed(((MC1710NBTCompound) tagMap.writeNBT()).getMCTag(), new FileOutputStream(file));
// OLD: CompressedStreamTools.writeCompressed(((NBTWrapper) tagMap.writeNBT()).getMCTag(), new FileOutputStream(file));
PlatformServiceHolder.get().writeCompressedNBT(tagMap.writeNBT(), file);
if (file1.exists()) {
file1.delete();
@@ -72,7 +72,7 @@ public class TagController {
for (int i = 0; i < list.size(); i++) {
INBTCompound nbttagcompound = list.getCompound(i);
Tag tag = new Tag();
// OLD: tag.readNBT(new MC1710NBTCompound(nbttagcompound));
// OLD: tag.readNBT(new NBTWrapper(nbttagcompound));
tag.readNBT(nbttagcompound);
tags.put(tag.id, tag);
}
@@ -85,7 +85,7 @@ public class TagController {
for (int slot : tags.keySet()) {
Tag tag = tags.get(slot);
INBTCompound nbtfactions = NBT.compound();
// OLD: tag.writeNBT(new MC1710NBTCompound(nbtfactions));
// OLD: tag.writeNBT(new NBTWrapper(nbtfactions));
tag.writeNBT(nbtfactions);
list.addCompound(nbtfactions);
}
@@ -77,7 +77,7 @@ public class TransportController {
for (int i = 0; i < list.size(); i++) {
TransportCategory category = new TransportCategory();
INBTCompound compound = list.getCompound(i);
// OLD: category.readNBT(new MC1710NBTCompound(compound));
// OLD: category.readNBT(new NBTWrapper(compound));
category.readNBT(compound);
for (TransportLocation location : category.locations.values())