Fix not saving matter cap of matter replicator
This commit is contained in:
parent
189dcbe60f
commit
a976947a2a
@ -202,6 +202,7 @@ public class BlockEntityMatterReplicator extends BlockEntityMatteryPoweredWorker
|
||||
public CompoundTag save(CompoundTag nbt) {
|
||||
nbt.put("regular_slots", regular_slots.serializeNBT());
|
||||
nbt.put("reserved_slots", reserved_slots.serializeNBT());
|
||||
nbt.put("matter_capability", matter.serializeNBT());
|
||||
return super.save(nbt);
|
||||
}
|
||||
|
||||
@ -210,6 +211,9 @@ public class BlockEntityMatterReplicator extends BlockEntityMatteryPoweredWorker
|
||||
super.load(nbt);
|
||||
regular_slots.deserializeNBT(nbt.get("regular_slots"));
|
||||
reserved_slots.deserializeNBT(nbt.get("reserved_slots"));
|
||||
|
||||
if (nbt.get("matter_capability") instanceof CompoundTag tag)
|
||||
matter.deserializeNBT(tag);
|
||||
}
|
||||
|
||||
private boolean valid = true;
|
||||
|
Loading…
Reference in New Issue
Block a user