From 1d6f2e4274190871a607b191f2cca51e90da25af Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 22 Aug 2018 03:51:52 +1000 Subject: [PATCH] Fix setbiome --- .../fawe/bukkit/v0/BukkitChunk_All.java | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v0/BukkitChunk_All.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v0/BukkitChunk_All.java index 9839fda48..24fa650d8 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v0/BukkitChunk_All.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v0/BukkitChunk_All.java @@ -165,20 +165,21 @@ public class BukkitChunk_All extends IntFaweChunk { if (previous != null) { task.run(previous, this); } + } - // Biomes - if (layer == 0) { - final byte[] biomes = getBiomeArray(); - if (biomes != null) { - int index = 0; - for (int z = 0; z < 16; z++) { - int zz = bx + z; - for (int x = 0; x < 16; x++) { - int xx = bz + x; - Biome bukkitBiome = adapter.getBiome(biomes[index++] & 0xFF); - world.setBiome(xx, zz, bukkitBiome); - } - } + // Biomes + final byte[] biomes = getBiomeArray(); + if (biomes != null) { + int index = 0; + for (int z = 0; z < 16; z++) { + int zz = bz + z; + for (int x = 0; x < 16; x++, index++) { + int xx = bx + x; + int biome = biomes[index] & 0xFF; + if (biome == 0) continue; + if (biome == -1) biome = 0; + Biome bukkitBiome = adapter.getBiome(biome); + world.setBiome(xx, zz, bukkitBiome); } } }