Update SaveVersion.java (#10192)

some mods can use tile.data for some extra use for terrain
This commit is contained in:
酪桦姬 2024-10-05 03:15:12 +08:00 committed by GitHub
parent b5ad4e01ae
commit e4283a3064
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -232,7 +232,8 @@ public abstract class SaveVersion extends SaveFileReader{
Tile tile = world.rawTile(i % world.width(), i / world.width());
stream.writeShort(tile.blockID());
boolean savedata = tile.block().saveData;
boolean savedata = tile.floor().saveData || tile.overlay().saveData || tile.block().saveData;
byte packed = (byte)((tile.build != null ? 1 : 0) | (savedata ? 2 : 0));
//make note of whether there was an entity/rotation here