From b4c3e3989c656692d001aad6070120f3385ef66e Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sat, 9 Sep 2017 00:35:29 +1000 Subject: [PATCH] Fix randomization and FilteredTextureUtil with CFI --- .../boydti/fawe/regions/general/plot/CreateFromImage.java | 7 ++++++- .../java/com/boydti/fawe/util/FilteredTextureUtil.java | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/boydti/fawe/regions/general/plot/CreateFromImage.java b/core/src/main/java/com/boydti/fawe/regions/general/plot/CreateFromImage.java index a73220cf..417170fc 100644 --- a/core/src/main/java/com/boydti/fawe/regions/general/plot/CreateFromImage.java +++ b/core/src/main/java/com/boydti/fawe/regions/general/plot/CreateFromImage.java @@ -252,7 +252,12 @@ public class CreateFromImage extends Command { // roughness // blocks if (argList.size() != 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " "); + C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " "); + return; + } + if (argList.get(1).equalsIgnoreCase("*")) { + generator.setTextureUtil(Fawe.get().getTextureUtil()); + player.sendMessage("Set color palette blocks, what's next?"); return; } context.setPreferringWildcard(true); diff --git a/core/src/main/java/com/boydti/fawe/util/FilteredTextureUtil.java b/core/src/main/java/com/boydti/fawe/util/FilteredTextureUtil.java index 33879ec0..82ea6d4e 100644 --- a/core/src/main/java/com/boydti/fawe/util/FilteredTextureUtil.java +++ b/core/src/main/java/com/boydti/fawe/util/FilteredTextureUtil.java @@ -8,6 +8,8 @@ import java.util.Set; public class FilteredTextureUtil extends TextureUtil { public FilteredTextureUtil(TextureUtil parent, Set blocks) throws FileNotFoundException { super(parent.getFolder()); + this.validMixBiomeColors = parent.validMixBiomeColors; + this.validMixBiomeIds = parent.validMixBiomeIds; this.validBiomes = parent.validBiomes; this.blockColors = parent.blockColors; this.blockDistance = parent.blockDistance;