diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java index cd261125..3572cf71 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java @@ -192,44 +192,12 @@ public class TestblockCommand extends SWCommand { }; } - public static class TestblockParameter { - private boolean water = false; - private boolean tnt = false; - private boolean extension = false; - private boolean onlyColor = false; - - private boolean ignoreAir = false; - - public void enableWater() { - this.water = true; - } - - public void enableTNT() { - this.tnt = true; - } - - public void enableExtension() { - this.extension = true; - } - - public void enableOnlyColor() { - this.onlyColor = true; - } - - public void enableIgnoreAir() { - this.ignoreAir = true; - } - } - public enum TestblockParameterType { - EXTENSION(TestblockParameter::enableExtension, Arrays.asList("-e", "-extension")), - TNT(TestblockParameter::enableTNT, Arrays.asList("-t", "-tnt")), - WATER(TestblockParameter::enableWater, Arrays.asList("-w", "-water")), - IGNORE_AIR(TestblockParameter::enableIgnoreAir, Arrays.asList("-ig", "-ignore_air")), - ONLY_COLOR(TestblockParameter::enableOnlyColor, Arrays.asList("-o", "-color", "-only_color")); - - @Getter - private final Consumer testblockParameterConsumer; + EXTENSION(Arrays.asList("-e", "-extension")), + TNT(Arrays.asList("-t", "-tnt")), + WATER(Arrays.asList("-w", "-water")), + IGNORE_AIR(Arrays.asList("-ig", "-ignore_air")), + ONLY_COLOR(Arrays.asList("-o", "-color", "-only_color")); @Getter private List tabCompletes; @@ -238,8 +206,7 @@ public class TestblockCommand extends SWCommand { private final Supplier removed; private AtomicReference cached = new AtomicReference<>(); - TestblockParameterType(Consumer testblockParameterConsumer, List tabCompletes, String... removed) { - this.testblockParameterConsumer = testblockParameterConsumer; + TestblockParameterType(List tabCompletes, String... removed) { this.tabCompletes = tabCompletes; this.removed = () -> { if (cached.get() == null) { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/utils/PasteBuilder.java b/BauSystem_Main/src/de/steamwar/bausystem/utils/PasteBuilder.java index 3dddc008..b0479f90 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/utils/PasteBuilder.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/utils/PasteBuilder.java @@ -183,7 +183,10 @@ public class PasteBuilder { clipboard.setBlock(blockVector3, air); return; } - clipboard.setBlock(blockVector3, waterloggedRemover.applyBlock(blockVector3)); + baseBlock = waterloggedRemover.applyBlock(blockVector3); + if (baseBlock != air) { + clipboard.setBlock(blockVector3, baseBlock); + } }); }