From b36c3dfc90e211864796c1c2fa0e7f5d2f46d804 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 10 Jan 2018 19:53:02 +1100 Subject: [PATCH] * --- .../java/com/boydti/fawe/command/CFICommands.java | 2 +- .../fawe/jnbt/anvil/HeightMapMCAGenerator.java | 13 ++++++------- .../main/java/com/boydti/fawe/util/TextureUtil.java | 1 - 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/com/boydti/fawe/command/CFICommands.java b/core/src/main/java/com/boydti/fawe/command/CFICommands.java index 94b42ee5..6c2e9ec7 100644 --- a/core/src/main/java/com/boydti/fawe/command/CFICommands.java +++ b/core/src/main/java/com/boydti/fawe/command/CFICommands.java @@ -582,7 +582,7 @@ public class CFICommands extends MethodCommands { } @Command( - aliases = {"thickness", "width", "worldthickness"}, + aliases = {"worldthickness", "width", "thickness"}, usage = "", desc = "Set the thickness of the generated world\n" + " - A value of 0 is the default and will not modify the height" diff --git a/core/src/main/java/com/boydti/fawe/jnbt/anvil/HeightMapMCAGenerator.java b/core/src/main/java/com/boydti/fawe/jnbt/anvil/HeightMapMCAGenerator.java index 70cf8c1b..00d84b96 100644 --- a/core/src/main/java/com/boydti/fawe/jnbt/anvil/HeightMapMCAGenerator.java +++ b/core/src/main/java/com/boydti/fawe/jnbt/anvil/HeightMapMCAGenerator.java @@ -1854,12 +1854,7 @@ public class HeightMapMCAGenerator extends MCAWriter implements SimpleWorld, Faw } int minLayer = Math.max(0, (minY - primtives.floorThickness) >> 4); - if (primtives.worldThickness != 0) { - for (int layer = 0; layer < minLayer; layer++) { - chunk.ids[layer] = null; - chunk.data[layer] = null; - } - } + if (primtives.floorThickness != 0) { for (int layer = minLayer; layer <= maxLayer; layer++) { byte[] layerIds = chunk.ids[layer]; @@ -1898,6 +1893,10 @@ public class HeightMapMCAGenerator extends MCAWriter implements SimpleWorld, Faw } } if (primtives.worldThickness != 0) { + for (int layer = 0; layer < minLayer; layer++) { + chunk.ids[layer] = null; + chunk.data[layer] = null; + } for (int layer = minLayer; layer <= maxLayer; layer++) { byte[] layerIds = chunk.ids[layer]; byte[] layerDatas = chunk.data[layer]; @@ -1909,7 +1908,7 @@ public class HeightMapMCAGenerator extends MCAWriter implements SimpleWorld, Faw globalIndex = indexes[index]; int height = heightMap[index]; - int min = (minArr[index] & 0xFF) - primtives.floorThickness; + int min = (minArr[index] & 0xFF) - primtives.worldThickness; int localMin = min - startY; if (localMin > 0) { char floorCombined = floor[globalIndex]; diff --git a/core/src/main/java/com/boydti/fawe/util/TextureUtil.java b/core/src/main/java/com/boydti/fawe/util/TextureUtil.java index f3e92d27..3c56c7c8 100644 --- a/core/src/main/java/com/boydti/fawe/util/TextureUtil.java +++ b/core/src/main/java/com/boydti/fawe/util/TextureUtil.java @@ -14,7 +14,6 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import it.unimi.dsi.fastutil.ints.IntArraySet; import it.unimi.dsi.fastutil.longs.LongArrayList; -import java.awt.Color; import java.awt.image.BufferedImage; import java.io.File; import java.io.FileNotFoundException;