SteamWar/BauSystem2.0
Archiviert
12
0

Hotfix PasteBuilder.removeWater
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-09-19 16:35:58 +02:00
Ursprung 110172a98a
Commit b47210a5ae
2 geänderte Dateien mit 10 neuen und 40 gelöschten Zeilen

Datei anzeigen

@ -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) {

Datei anzeigen

@ -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);
}
});
}