From 4e1aacb5665e1fbeca4c4f5012f156a0cfa6aa95 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 1 Dec 2016 13:58:31 +1100 Subject: [PATCH] Potentially fixes #348 --- .../com/boydti/fawe/bukkit/v1_7/BukkitChunk_1_7.java | 10 ++-------- .../java/com/boydti/fawe/forge/v0/ForgeChunk_All.java | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitChunk_1_7.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitChunk_1_7.java index 07f500ee..7524906d 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitChunk_1_7.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitChunk_1_7.java @@ -308,20 +308,17 @@ public class BukkitChunk_1_7 extends CharFaweChunk { section.setIdArray(newIdArray); continue; } - boolean fill = true; int solid = 0; char[] charArray = this.getIdArray(j); for (int k = 0; k < newIdArray.length; k++) { char combined = charArray[k]; switch (combined) { case 0: - fill = false; - continue; - case 1: - fill = false; if (currentIdArray[k] != 0) { solid++; } + continue; + case 1: currentIdArray[k] = 0; continue; default: @@ -339,9 +336,6 @@ public class BukkitChunk_1_7 extends CharFaweChunk { } } getParent().setCount(0, solid, section); - if (fill) { - this.setCount(j, Short.MAX_VALUE); - } } // Set biomes diff --git a/forge1710/src/main/java/com/boydti/fawe/forge/v0/ForgeChunk_All.java b/forge1710/src/main/java/com/boydti/fawe/forge/v0/ForgeChunk_All.java index ed170d49..f5d5e504 100644 --- a/forge1710/src/main/java/com/boydti/fawe/forge/v0/ForgeChunk_All.java +++ b/forge1710/src/main/java/com/boydti/fawe/forge/v0/ForgeChunk_All.java @@ -256,20 +256,17 @@ public class ForgeChunk_All extends CharFaweChunk { if (!data) { section.setBlockMetadataArray(newDataArray); } - boolean fill = true; int solid = 0; char[] charArray = this.getIdArray(j); for (int k = 0; k < newIdArray.length; k++) { char combined = charArray[k]; switch (combined) { case 0: - fill = false; - continue; - case 1: - fill = false; if (currentIdArray[k] != 0) { solid++; } + continue; + case 1: currentIdArray[k] = 0; continue; default: @@ -287,9 +284,6 @@ public class ForgeChunk_All extends CharFaweChunk { } } getParent().setCount(0, solid, section); - if (fill) { - this.setCount(j, Short.MAX_VALUE); - } } // Set biomes