Fix biome sending

This commit is contained in:
Jesse Boyd
2019-11-14 19:21:28 +00:00
parent b38ff03ca6
commit 601890fe64
8 changed files with 80 additions and 26 deletions

View File

@ -46,6 +46,7 @@ public class CharSetBlocks extends CharBlocks implements IChunkSet {
@Override
public BiomeType getBiomeType(int x, int z) {
if (biomes == null) return null;
return biomes[(z << 4) | x];
}

View File

@ -26,7 +26,7 @@ public class ChunkSendProcessor implements IBatchProcessor {
public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) {
int chunkX = chunk.getX();
int chunkZ = chunk.getZ();
boolean replaceAll = set.getBiomeType(0, 0) != null;
boolean replaceAll = set.hasBiomes();
ChunkPacket packet = new ChunkPacket(chunkX, chunkZ, () -> set, replaceAll);
Stream<Player> stream = this.players.get();
if (stream == null) {