From 4267bf1c27429513099697fe8a5a56bf4fc1c03b Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 17 Aug 2016 15:01:32 +1000 Subject: [PATCH] Fix biome masking --- .../boydti/fawe/object/extent/ProcessedWEExtent.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/boydti/fawe/object/extent/ProcessedWEExtent.java b/core/src/main/java/com/boydti/fawe/object/extent/ProcessedWEExtent.java index e78da0a2..500df831 100644 --- a/core/src/main/java/com/boydti/fawe/object/extent/ProcessedWEExtent.java +++ b/core/src/main/java/com/boydti/fawe/object/extent/ProcessedWEExtent.java @@ -95,7 +95,15 @@ public class ProcessedWEExtent extends FaweRegionExtent { @Override public boolean setBiome(final Vector2D position, final BaseBiome biome) { - return super.setBiome(position, biome); + if (WEManager.IMP.maskContains(this.mask, (int) position.getX(), (int) position.getZ())) { + if (!limit.MAX_CHANGES()) { + WEManager.IMP.cancelEditSafe(this, BBC.WORLDEDIT_CANCEL_REASON_MAX_CHANGES); + return false; + } + return super.setBiome(position, biome); + } else if (!limit.MAX_FAILS()) { + WEManager.IMP.cancelEditSafe(this, BBC.WORLDEDIT_CANCEL_REASON_MAX_FAILS); + } } @Override