This commit is contained in:
Anuken
2020-06-26 14:27:26 -04:00
parent eabc5c15c7
commit fdf7c88083
228 changed files with 1219 additions and 1163 deletions
@@ -65,7 +65,7 @@ public abstract class LegacySaveVersion extends SaveVersion{
try{
readChunk(stream, true, in -> {
byte version = in.readByte();
//legacy impl of TileEntity#read()
//legacy impl of Building#read()
tile.entity.health(stream.readUnsignedShort());
byte packedrot = stream.readByte();
byte team = Pack.leftByte(packedrot) == 8 ? stream.readByte() : Pack.leftByte(packedrot);
@@ -74,9 +74,9 @@ public abstract class LegacySaveVersion extends SaveVersion{
tile.setTeam(Team.get(team));
tile.rotation(rotation);
if(tile.entity.items() != null) tile.entity.items().read(Reads.get(stream));
if(tile.entity.power() != null) tile.entity.power().read(Reads.get(stream));
if(tile.entity.liquids() != null) tile.entity.liquids().read(Reads.get(stream));
if(tile.entity.items != null) tile.entity.items.read(Reads.get(stream));
if(tile.entity.power != null) tile.entity.power.read(Reads.get(stream));
if(tile.entity.liquids != null) tile.entity.liquids.read(Reads.get(stream));
if(tile.entity.cons() != null) tile.entity.cons().read(Reads.get(stream));
//read only from subclasses!
@@ -73,7 +73,7 @@ public class LegacyTypeTable{
13 = Revenant
private static final Prov[] build81Table = {
Playerc::new,
Player::new,
Fire::new,
Puddle::new,
MinerDrone::new,
@@ -90,7 +90,7 @@ public class LegacyTypeTable{
};
private static final Prov[] build80Table = {
Playerc::new,
Player::new,
Fire::new,
Puddle::new,
Bullet::new,
@@ -109,7 +109,7 @@ public class LegacyTypeTable{
};
private static final Prov[] build79Table = {
Playerc::new,
Player::new,
Fire::new,
Puddle::new,
Bullet::new,