Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
110172a98a
Commit
b47210a5ae
@ -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 {
|
public enum TestblockParameterType {
|
||||||
EXTENSION(TestblockParameter::enableExtension, Arrays.asList("-e", "-extension")),
|
EXTENSION(Arrays.asList("-e", "-extension")),
|
||||||
TNT(TestblockParameter::enableTNT, Arrays.asList("-t", "-tnt")),
|
TNT(Arrays.asList("-t", "-tnt")),
|
||||||
WATER(TestblockParameter::enableWater, Arrays.asList("-w", "-water")),
|
WATER(Arrays.asList("-w", "-water")),
|
||||||
IGNORE_AIR(TestblockParameter::enableIgnoreAir, Arrays.asList("-ig", "-ignore_air")),
|
IGNORE_AIR(Arrays.asList("-ig", "-ignore_air")),
|
||||||
ONLY_COLOR(TestblockParameter::enableOnlyColor, Arrays.asList("-o", "-color", "-only_color"));
|
ONLY_COLOR(Arrays.asList("-o", "-color", "-only_color"));
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final Consumer<TestblockParameter> testblockParameterConsumer;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private List<String> tabCompletes;
|
private List<String> tabCompletes;
|
||||||
@ -238,8 +206,7 @@ public class TestblockCommand extends SWCommand {
|
|||||||
private final Supplier<TestblockParameterType[]> removed;
|
private final Supplier<TestblockParameterType[]> removed;
|
||||||
private AtomicReference<TestblockParameterType[]> cached = new AtomicReference<>();
|
private AtomicReference<TestblockParameterType[]> cached = new AtomicReference<>();
|
||||||
|
|
||||||
TestblockParameterType(Consumer<TestblockParameter> testblockParameterConsumer, List<String> tabCompletes, String... removed) {
|
TestblockParameterType(List<String> tabCompletes, String... removed) {
|
||||||
this.testblockParameterConsumer = testblockParameterConsumer;
|
|
||||||
this.tabCompletes = tabCompletes;
|
this.tabCompletes = tabCompletes;
|
||||||
this.removed = () -> {
|
this.removed = () -> {
|
||||||
if (cached.get() == null) {
|
if (cached.get() == null) {
|
||||||
|
@ -183,7 +183,10 @@ public class PasteBuilder {
|
|||||||
clipboard.setBlock(blockVector3, air);
|
clipboard.setBlock(blockVector3, air);
|
||||||
return;
|
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