SteamWar/BauSystem2.0
Archiviert
12
0

Commits vergleichen

..

Keine gemeinsamen Commits. "5c8b70fc128f90b11fc5c3f4b08de7287bfaafee" und "cdc0dbea86647e499099b23d3f2f420a0ada63f8" haben vollständig unterschiedliche Historien.

4 geänderte Dateien mit 12 neuen und 15 gelöschten Zeilen

Datei anzeigen

@ -159,8 +159,7 @@ public class FlatteningWrapper15 implements FlatteningWrapper {
public boolean test(BlockVector3 blockVector3) { public boolean test(BlockVector3 blockVector3) {
BaseBlock block = clipboard.getFullBlock(blockVector3); BaseBlock block = clipboard.getFullBlock(blockVector3);
String blockName = block.toString().toLowerCase(); String blockName = block.toString().toLowerCase();
if (pasteOptions.isTestBlock() && blockName.equals("minecraft.water")) return true; return !blockName.equals("minecraft:water") || blocks.contains(blockName);
return blocks.contains(blockName);
} }
@Nullable @Nullable

Datei anzeigen

@ -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, true); region.reset(RegionType.TESTBLOCK, regionExtensionType);
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, true); region.reset(node, RegionType.TESTBLOCK, regionExtensionType);
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);

Datei anzeigen

@ -67,6 +67,4 @@ public class PasteOptions {
* Used in 1.15 * Used in 1.15
*/ */
private final int waterLevel; private final int waterLevel;
private final boolean testBlock;
} }

Datei anzeigen

@ -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, boolean isTestBlock) throws IOException { public void reset(RegionType regionType, RegionExtensionType regionExtensionType) throws IOException {
reset(null, regionType, regionExtensionType, isTestBlock); reset(null, regionType, regionExtensionType, false);
} }
public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType, boolean isTestBlock) throws IOException { public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType) throws IOException {
reset(schematic, regionType, regionExtensionType, false, isTestBlock); reset(schematic, regionType, regionExtensionType, false);
} }
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));
initSessions(); initSessions();
undoSessions.push(editSession); undoSessions.push(editSession);
} }
public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType, boolean ignoreAir, boolean isTestBlock) throws IOException { public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType, boolean ignoreAir) throws IOException {
reset(schematic, regionType, regionExtensionType, ignoreAir, false, isTestBlock); reset(schematic, regionType, regionExtensionType, ignoreAir, false);
} }
public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType, boolean ignoreAir, boolean onlyColors, boolean isTestBlock) throws IOException { public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType, boolean ignoreAir, boolean onlyColors) 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, isTestBlock); 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);
Point pastePoint; Point pastePoint;
File tempFile = null; File tempFile = null;