Moved save logic inside the 1.20 branch, as they don't compile without errors on 1.21
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user