From 8db8a30455f8a465accc031e197b8b36018134ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Mon, 20 Apr 2020 23:36:56 +0200 Subject: [PATCH] Fix biome setting --- .../com/plotsquared/bukkit/util/BukkitUtil.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java index cb131dd54..1594231fe 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java @@ -517,17 +517,8 @@ public class BukkitUtil extends WorldUtil { for (int x = region.getMinimumPoint().getX(); x <= region.getMaximumPoint().getX(); x++) { for (int z = region.getMinimumPoint().getZ(); z <= region.getMaximumPoint().getZ(); z++) { - for (int y = 0; y < world.getMaxHeight(); y++) { - try { - if (biomeSetter != null) { - biomeSetter.invoke(world, x, z, biome); - } else { - world.setBiome(x, y, z, biome); - } - } catch (final Exception e) { - PlotSquared.log("An error occurred setting the biome:"); - e.printStackTrace(); - } + if (world.getBiome(x, 64, z) != biome) { + world.setBiome(x, z, biome); } } }