Moved save logic inside the 1.20 branch, as they don't compile without errors on 1.21

This commit is contained in:
2026-05-20 20:20:43 -04:00
parent 50c958ff52
commit 40292ae052
9 changed files with 9 additions and 9 deletions
@@ -174,7 +174,6 @@ public class DNAAnalyzerBlockEntity extends BlockEntity implements ExtendedMenuP
energyStorage.loadNBT(tag.getCompound("Energy"));
}
}
//?}
private ListTag saveInventory() {
ListTag listTag = new ListTag();
@@ -204,6 +203,7 @@ public class DNAAnalyzerBlockEntity extends BlockEntity implements ExtendedMenuP
}
}
}
//?}
public void tick(Level level, BlockPos pos, BlockState state) {
if (level.isClientSide) return;
@@ -174,7 +174,6 @@ public class DNAExtractorBlockEntity extends BlockEntity implements ExtendedMenu
energyStorage.loadNBT(tag.getCompound("Energy"));
}
}
//?}
private ListTag saveInventory() {
ListTag listTag = new ListTag();
@@ -204,6 +203,7 @@ public class DNAExtractorBlockEntity extends BlockEntity implements ExtendedMenu
}
}
}
//?}
public void tick(Level level, BlockPos pos, BlockState state) {
if (level.isClientSide) return;
@@ -162,7 +162,6 @@ public class DNAHybridizerBlockEntity extends BlockEntity implements ExtendedMen
loadInventory(tag.getList("Inventory", 10));
loadCommonData(tag);
}
//?}
private ListTag saveInventory() {
ListTag listTag = new ListTag();
@@ -192,6 +191,7 @@ public class DNAHybridizerBlockEntity extends BlockEntity implements ExtendedMen
}
}
}
//?}
private void saveCommonData(CompoundTag tag) {
tag.putInt("Prog", this.progress);
@@ -159,7 +159,6 @@ public class EmbryoCalcificationMachineBlockEntity extends BlockEntity implement
loadInventory(tag.getList("Inventory", 10));
loadCommonData(tag);
}
//?}
private ListTag saveInventory() {
ListTag listTag = new ListTag();
@@ -189,6 +188,7 @@ public class EmbryoCalcificationMachineBlockEntity extends BlockEntity implement
}
}
}
//?}
private void saveCommonData(CompoundTag tag) {
tag.putInt("Prog", this.progress);
@@ -163,7 +163,6 @@ public class EmbryonicMachineBlockEntity extends BlockEntity implements Extended
loadInventory(tag.getList("Inventory", 10));
loadCommonData(tag);
}
//?}
private ListTag saveInventory() {
ListTag listTag = new ListTag();
@@ -193,6 +192,7 @@ public class EmbryonicMachineBlockEntity extends BlockEntity implements Extended
}
}
}
//?}
private void saveCommonData(CompoundTag tag) {
tag.putInt("Prog", this.progress);
@@ -200,7 +200,6 @@ public class FossilCleanerBlockEntity extends BlockEntity implements ExtendedMen
if (tag.contains("Energy")) energyStorage.loadNBT(tag.getCompound("Energy"));
if (tag.contains("Fluid")) fluidStack = FluidStack.read(tag.getCompound("Fluid"));
}
//?}
private ListTag saveInventory() {
ListTag listTag = new ListTag();
@@ -230,6 +229,7 @@ public class FossilCleanerBlockEntity extends BlockEntity implements ExtendedMen
}
}
}
//?}
public void tick(Level level, BlockPos pos, BlockState state) {
if (level.isClientSide) return;
@@ -159,7 +159,6 @@ public class FossilGrinderBlockEntity extends BlockEntity implements ExtendedMen
loadInventory(tag.getList("Inventory", 10));
loadCommonData(tag);
}
//?}
private ListTag saveInventory() {
ListTag listTag = new ListTag();
@@ -189,6 +188,7 @@ public class FossilGrinderBlockEntity extends BlockEntity implements ExtendedMen
}
}
}
//?}
private void saveCommonData(CompoundTag tag) {
tag.putInt("Prog", this.progress);
@@ -188,7 +188,6 @@ public class IncubatorBlockEntity extends BlockEntity implements ExtendedMenuPro
maxProgress[1] = tag.getInt("Max1");
maxProgress[2] = tag.getInt("Max2");
}
//?}
private ListTag saveInventory() {
ListTag listTag = new ListTag();
@@ -218,6 +217,7 @@ public class IncubatorBlockEntity extends BlockEntity implements ExtendedMenuPro
}
}
}
//?}
public void tick(Level level, BlockPos pos, BlockState state) {
if (level.isClientSide) return;
@@ -313,7 +313,6 @@ public class TankBlockEntity extends BlockEntity implements ExtendedMenuProvider
this.fluidStack = FluidStack.empty();
}
}
//?}
private ListTag saveInventory() {
ListTag listTag = new ListTag();
@@ -343,6 +342,7 @@ public class TankBlockEntity extends BlockEntity implements ExtendedMenuProvider
}
}
}
//?}
@Nullable
@Override