extend biome ids, remove biome id saving
This commit is contained in:
parent
f613bd2122
commit
15459fc627
7 changed files with 119 additions and 37 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue