change biome packet
This commit is contained in:
parent
88c43d0824
commit
ffca1f62e5
7 changed files with 50 additions and 80 deletions
|
@ -780,7 +780,7 @@ public class ClientPlayer extends NetHandler implements IClientPlayer
|
|||
{
|
||||
NetHandler.checkThread(packetIn, this, this.gameController, this.clientWorldController);
|
||||
ChunkClient chunk = this.clientWorldController.getChunk(packetIn.getChunkX(), packetIn.getChunkZ());
|
||||
chunk.setBiomes(packetIn.getBiomes());
|
||||
chunk.setBiome(packetIn.getPos(), packetIn.getBiome());
|
||||
this.clientWorldController.markBlockRangeForRenderUpdate(packetIn.getChunkX() << 4, -World.MAX_SIZE_Y, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, World.MAX_SIZE_Y, (packetIn.getChunkZ() << 4) + 15);
|
||||
}
|
||||
|
||||
|
|
|
@ -133,6 +133,10 @@ public class ChunkClient extends Chunk {
|
|||
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;
|
||||
}
|
||||
|
||||
public boolean isDummy() {
|
||||
return false;
|
||||
|
|
|
@ -107,7 +107,7 @@ public class ChunkEmpty extends ChunkClient {
|
|||
return Biome.DEF_BIOME;
|
||||
}
|
||||
|
||||
public void setBiomes(byte[] biomes) {
|
||||
public void setBiome(BlockPos pos, Biome biome) {
|
||||
}
|
||||
|
||||
public void resetRelight() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue