Skip to content

Commit 7ac46eb

Browse files
authored
slightly better fluid vein version handling (GregTechCEu#2035)
1 parent 55f0bf3 commit 7ac46eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/gregtech/api/worldgen/bedrockFluids/BedrockFluidVeinSaveData.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ public void readFromNBT(NBTTagCompound nbt) {
3434

3535
if (nbt.hasKey("version")) {
3636
BedrockFluidVeinHandler.saveDataVersion = nbt.getInteger("version");
37+
} else if (veinList.isEmpty()) {
38+
// there are no veins, so there is no data to be changed or lost by bumping the version
39+
BedrockFluidVeinHandler.saveDataVersion = BedrockFluidVeinHandler.MAX_FLUID_SAVE_DATA_VERSION;
3740
} else {
3841
// version number was added to the save data with version 2
3942
BedrockFluidVeinHandler.saveDataVersion = 1;

0 commit comments

Comments
 (0)