fix chunk glitch

This commit is contained in:
Sen 2025-07-01 16:36:33 +02:00
parent 24e249913d
commit f241158cc1
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
3 changed files with 21 additions and 5 deletions

View file

@ -875,14 +875,14 @@ public class Player extends User implements ICrafting, Executor, IPlayer
if(extend == null) {
for(BlockArray arr : aextendedblockstorage) {
if(arr != null && (!biomes || !arr.isEmpty()))
if(arr != null && (!biomes || arr.hasData()))
list.add(arr);
}
}
else {
for(int cy : extend) {
BlockArray arr = chunk.getArray(cy);
if(arr != null && (!biomes || !arr.isEmpty()))
if(arr != null && (!biomes || arr.hasData()))
list.add(arr);
}
}

View file

@ -562,7 +562,7 @@ public class Region {
for(int n = 0; n < sects.size(); ++n) {
TagObject sect = sects.get(n);
int y = sect.getInt("Y");
BlockArray storage = new BlockArray(y << 4, light, null);
BlockArray storage = new BlockArray(y << 4, light, y < 0 ? world.dimension.getFiller() : null);
byte[] blocks = sect.getByteArray("Dat0");
NibbleArray data = new NibbleArray(sect.getByteArray("Dat1"));
NibbleArray adddata = sect.hasByteArray("Dat2") ? new NibbleArray(sect.getByteArray("Dat2")) : null;