Small changes
This commit is contained in:
parent
a2605ef3f9
commit
2aa08604bd
1 changed files with 12 additions and 8 deletions
|
@ -51,19 +51,23 @@ public class ServerWorldMixin {
|
|||
fix = !dataVersion.equals(version);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
if (fix) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue