Small changes

This commit is contained in:
paulevsGitch 2021-03-13 05:11:16 +03:00
parent a2605ef3f9
commit 2aa08604bd

View file

@ -51,19 +51,23 @@ public class ServerWorldMixin {
fix = !dataVersion.equals(version); fix = !dataVersion.equals(version);
} }
else { else {
CompoundTag root = new CompoundTag();
root.putString("version", version);
try {
NbtIo.write(root, beData);
}
catch (IOException e) {
BetterEnd.LOGGER.error("World data saving failed", e);
}
fix = true; fix = true;
} }
if (fix) { if (fix) {
DataFixerUtil.fixData(beData.getParentFile()); DataFixerUtil.fixData(beData.getParentFile());
be_writeDataFile(beData, version);
}
}
private void be_writeDataFile(File file, String version) {
CompoundTag root = new CompoundTag();
root.putString("version", version);
try {
NbtIo.write(root, file);
}
catch (IOException e) {
BetterEnd.LOGGER.error("World data saving failed", e);
} }
} }
} }