extend biome ids, remove biome id saving

This commit is contained in:
Sen 2025-06-29 20:03:00 +02:00
parent f613bd2122
commit 15459fc627
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
7 changed files with 119 additions and 37 deletions

View file

@ -105,7 +105,10 @@ public class ChunkClient extends Chunk {
}
if(biomes) {
System.arraycopy(data, pos, this.biomes, 0, this.biomes.length);
for(int k = 0; k < this.biomes.length; ++k) {
this.biomes[k] = (char)((data[pos + 1] & 255) << 8 | data[pos] & 255);
pos += 2;
}
}
for(int cy : extend) {
@ -128,14 +131,8 @@ public class ChunkClient extends Chunk {
this.loaded = true;
}
public Biome getBiome(BlockPos pos) {
int x = pos.getX() & 15;
int z = pos.getZ() & 15;
return Biome.getBiomeDef(this.biomes[z << 4 | x] & 255);
}
public void setBiome(BlockPos pos, Biome biome) {
this.biomes[((pos.getZ() & 15) << 4 | pos.getX() & 15)] = (byte)biome.id;
this.biomes[((pos.getZ() & 15) << 4 | pos.getX() & 15)] = (char)biome.id;
}
public boolean isDummy() {