QOL #203
@ -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<TestblockParameter> 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<String> tabCompletes;
|
||||
@ -238,8 +206,7 @@ public class TestblockCommand extends SWCommand {
|
||||
private final Supplier<TestblockParameterType[]> removed;
|
||||
private AtomicReference<TestblockParameterType[]> cached = new AtomicReference<>();
|
||||
|
||||
TestblockParameterType(Consumer<TestblockParameter> testblockParameterConsumer, List<String> tabCompletes, String... removed) {
|
||||
this.testblockParameterConsumer = testblockParameterConsumer;
|
||||
TestblockParameterType(List<String> tabCompletes, String... removed) {
|
||||
this.tabCompletes = tabCompletes;
|
||||
this.removed = () -> {
|
||||
if (cached.get() == null) {
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren