diff --git a/nukkit/src/main/java/com/boydti/fawe/nukkit/core/NukkitWorld.java b/nukkit/src/main/java/com/boydti/fawe/nukkit/core/NukkitWorld.java index 320e2a94..ba18c6f5 100644 --- a/nukkit/src/main/java/com/boydti/fawe/nukkit/core/NukkitWorld.java +++ b/nukkit/src/main/java/com/boydti/fawe/nukkit/core/NukkitWorld.java @@ -306,7 +306,7 @@ public class NukkitWorld extends LocalWorld { @Override public boolean setBiome(Vector2D position, BaseBiome biome) { - getLevel().setBiomeId(position.getBlockX(), position.getBlockZ(), biome.getId()); + getLevel().setBiomeId(position.getBlockX(), position.getBlockZ(), (byte) biome.getId()); return true; } diff --git a/nukkit/src/main/java/com/boydti/fawe/nukkit/optimization/queue/NukkitChunk.java b/nukkit/src/main/java/com/boydti/fawe/nukkit/optimization/queue/NukkitChunk.java index 045ab886..9ba2e941 100644 --- a/nukkit/src/main/java/com/boydti/fawe/nukkit/optimization/queue/NukkitChunk.java +++ b/nukkit/src/main/java/com/boydti/fawe/nukkit/optimization/queue/NukkitChunk.java @@ -83,12 +83,16 @@ public class NukkitChunk extends CharFaweChunk { if (biomes != null) { final LocalWorld lw = NukkitUtil.getLocalWorld(world); final byte[] biomes = getBiomeArray(); + final byte[] nukkitBiomes = chunk.getBiomeIdArray(); int index = 0; for (int z = 0; z < 16; z++) { int zz = Z + z; - for (int x = 0; x < 16; x++) { + for (int x = 0; x < 16; x++, index++) { int xx = X + x; - lw.setBiome(MutableBlockVector2D.get(xx, zz), FaweCache.getBiome(biomes[index++] & 0xFF)); + byte biome = biomes[index]; + if (biome == 0) continue; + if (biome == (byte) -1) biome = 0; + nukkitBiomes[index] = biome; } } }