TestBlockPaste-Without-Water #146
@ -147,7 +147,6 @@ public class FlatteningWrapper15 implements FlatteningWrapper {
|
|||||||
changeColor(clipboard, pasteOptions.getColor());
|
changeColor(clipboard, pasteOptions.getColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
zOnlyKroks markierte diese Unterhaltung als gelöst
Veraltet
|
|||||||
|
|
||||||
Set<String> blocks = new HashSet<>();
|
Set<String> blocks = new HashSet<>();
|
||||||
{
|
{
|
||||||
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_wool");
|
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_wool");
|
||||||
@ -174,6 +173,7 @@ public class FlatteningWrapper15 implements FlatteningWrapper {
|
|||||||
} catch (WorldEditException ex) {
|
} catch (WorldEditException ex) {
|
||||||
throw new RuntimeException(ex);
|
throw new RuntimeException(ex);
|
||||||
}
|
}
|
||||||
|
if (blockName.startsWith("minecraft:tnt")) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ public class TestblockCommand extends SWCommand {
|
|||||||
Region region = regionCheck(p);
|
Region region = regionCheck(p);
|
||||||
if (region == null) return;
|
if (region == null) return;
|
||||||
try {
|
try {
|
||||||
region.reset(RegionType.TESTBLOCK, regionExtensionType);
|
region.reset(RegionType.TESTBLOCK, regionExtensionType, regionExtensionType == null);
|
||||||
zOnlyKroks markierte diese Unterhaltung als gelöst
Veraltet
YoyoNow
hat
Hier die Daten durchzureichen ist nicht sinnvoll, da RegionType.TESTBLOCK ja doch schon sagt das es der Testblock ist. Hier die Daten durchzureichen ist nicht sinnvoll, da RegionType.TESTBLOCK ja doch schon sagt das es der Testblock ist.
|
|||||||
RegionUtils.message(region, "REGION_TB_DONE");
|
RegionUtils.message(region, "REGION_TB_DONE");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
BauSystem.MESSAGE.send("REGION_TB_ERROR", p);
|
BauSystem.MESSAGE.send("REGION_TB_ERROR", p);
|
||||||
@ -86,7 +86,7 @@ public class TestblockCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
region.reset(node, RegionType.TESTBLOCK, regionExtensionType);
|
region.reset(node, RegionType.TESTBLOCK, regionExtensionType,true);
|
||||||
zOnlyKroks markierte diese Unterhaltung als gelöst
Veraltet
YoyoNow
hat
Siehe oben Siehe oben
|
|||||||
RegionUtils.message(region, "REGION_TB_DONE");
|
RegionUtils.message(region, "REGION_TB_DONE");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
BauSystem.MESSAGE.send("REGION_TB_ERROR", p);
|
BauSystem.MESSAGE.send("REGION_TB_ERROR", p);
|
||||||
@ -101,6 +101,8 @@ public class TestblockCommand extends SWCommand {
|
|||||||
showModeParameterTypesMap.put("-n", RegionExtensionType.NORMAL);
|
showModeParameterTypesMap.put("-n", RegionExtensionType.NORMAL);
|
||||||
showModeParameterTypesMap.put("-extension", RegionExtensionType.EXTENSION);
|
showModeParameterTypesMap.put("-extension", RegionExtensionType.EXTENSION);
|
||||||
showModeParameterTypesMap.put("-e", RegionExtensionType.EXTENSION);
|
showModeParameterTypesMap.put("-e", RegionExtensionType.EXTENSION);
|
||||||
|
showModeParameterTypesMap.put("-t", null);
|
||||||
|
showModeParameterTypesMap.put("-tnt", null);
|
||||||
|
|
||||||
List<String> tabCompletes = new ArrayList<>(showModeParameterTypesMap.keySet());
|
List<String> tabCompletes = new ArrayList<>(showModeParameterTypesMap.keySet());
|
||||||
return SWCommandUtils.createMapper(s -> showModeParameterTypesMap.getOrDefault(s, null), s -> tabCompletes);
|
return SWCommandUtils.createMapper(s -> showModeParameterTypesMap.getOrDefault(s, null), s -> tabCompletes);
|
||||||
|
@ -45,4 +45,6 @@ public class PasteOptions {
|
|||||||
private final int waterLevel;
|
private final int waterLevel;
|
||||||
|
|
||||||
private final boolean testBlock;
|
private final boolean testBlock;
|
||||||
|
|
||||||
|
private final boolean removeTNT;
|
||||||
}
|
}
|
@ -421,25 +421,25 @@ public class Region {
|
|||||||
reset(schematic, regionType, RegionExtensionType.NORMAL, false);
|
reset(schematic, regionType, RegionExtensionType.NORMAL, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset(RegionType regionType, RegionExtensionType regionExtensionType) throws IOException {
|
public void reset(RegionType regionType, RegionExtensionType regionExtensionType,boolean removeTNT) throws IOException {
|
||||||
reset(null, regionType, regionExtensionType);
|
reset(null, regionType, regionExtensionType,removeTNT);
|
||||||
zOnlyKroks markierte diese Unterhaltung als gelöst
Veraltet
YoyoNow
hat
Muss diese Änderung eigentlich wirklich sein? Muss diese Änderung eigentlich wirklich sein?
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType) throws IOException {
|
public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType,boolean removeTNT) throws IOException {
|
||||||
reset(schematic, regionType, regionExtensionType, false);
|
reset(schematic, regionType, regionExtensionType, false,removeTNT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset(File file) {
|
public void reset(File file) {
|
||||||
EditSession editSession = paste(file, minPoint.add(prototype.getSizeX() / 2, 0, prototype.getSizeZ() / 2), new PasteOptions(false, false, Color.YELLOW, false, false, getMinPoint(RegionType.NORMAL, RegionExtensionType.NORMAL), getMaxPoint(RegionType.NORMAL, RegionExtensionType.NORMAL), waterLevel, false));
|
EditSession editSession = paste(file, minPoint.add(prototype.getSizeX() / 2, 0, prototype.getSizeZ() / 2), new PasteOptions(false, false, Color.YELLOW, false, false, getMinPoint(RegionType.NORMAL, RegionExtensionType.NORMAL), getMaxPoint(RegionType.NORMAL, RegionExtensionType.NORMAL), waterLevel, false,false));
|
||||||
initSessions();
|
initSessions();
|
||||||
undoSessions.push(editSession);
|
undoSessions.push(editSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType, boolean ignoreAir) throws IOException {
|
public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType, boolean ignoreAir, boolean removeTNT) throws IOException {
|
||||||
reset(schematic, regionType, regionExtensionType, ignoreAir, false);
|
reset(schematic, regionType, regionExtensionType, ignoreAir, false,removeTNT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType, boolean ignoreAir, boolean onlyColors) throws IOException {
|
public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType, boolean ignoreAir, boolean onlyColors,boolean removeTNT) throws IOException {
|
||||||
if (!hasReset(regionType)) {
|
if (!hasReset(regionType)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -447,7 +447,7 @@ public class Region {
|
|||||||
regionExtensionType = RegionExtensionType.NORMAL;
|
regionExtensionType = RegionExtensionType.NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
PasteOptions pasteOptions = new PasteOptions((schematic != null && (schematic.getSchemtype().fightType() || schematic.getSchemtype().check())), ignoreAir, getPlain(Flag.COLOR, ColorMode.class).getColor(), onlyColors, regionExtensionType == RegionExtensionType.EXTENSION, getMinPoint(regionType, regionExtensionType), getMaxPoint(regionType, regionExtensionType), waterLevel, regionType == RegionType.TESTBLOCK);
|
PasteOptions pasteOptions = new PasteOptions((schematic != null && (schematic.getSchemtype().fightType() || schematic.getSchemtype().check())), ignoreAir, getPlain(Flag.COLOR, ColorMode.class).getColor(), onlyColors, regionExtensionType == RegionExtensionType.EXTENSION, getMinPoint(regionType, regionExtensionType), getMaxPoint(regionType, regionExtensionType), waterLevel, regionType == RegionType.TESTBLOCK,removeTNT);
|
||||||
zOnlyKroks markierte diese Unterhaltung als gelöst
Veraltet
YoyoNow
hat
hier dann einfach den hier dann einfach den `isTextBlock` Boolean zu einem `regionType == RegionType.TESTBLOCK` ersetzten, dann brauchst du die ganzen booleans nicht.
|
|||||||
|
|
||||||
Point pastePoint;
|
Point pastePoint;
|
||||||
File tempFile = null;
|
File tempFile = null;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Warum schreibst das hier immer rein und machst es nicht optional anhand von dem color flag?