TestBlockPaste-Without-Water #146
@ -159,7 +159,8 @@ 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();
|
||||||
return !blockName.equals("minecraft:water") || blocks.contains(blockName);
|
if (pasteOptions.isTestBlock() && blockName.equals("minecraft.water")) return true;
|
||||||
|
return blocks.contains(blockName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -86,7 +86,7 @@ public class TestblockCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
region.reset(node, RegionType.TESTBLOCK, regionExtensionType);
|
region.reset(node, RegionType.TESTBLOCK, regionExtensionType, true);
|
||||||
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);
|
||||||
|
@ -67,4 +67,6 @@ public class PasteOptions {
|
|||||||
* Used in 1.15
|
* Used in 1.15
|
||||||
*/
|
*/
|
||||||
private final int waterLevel;
|
private final int waterLevel;
|
||||||
|
|
||||||
|
private final boolean testBlock;
|
||||||
}
|
}
|
@ -425,8 +425,8 @@ public class Region {
|
|||||||
reset(null, regionType, regionExtensionType, false);
|
reset(null, regionType, regionExtensionType, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType) throws IOException {
|
public void reset(SchematicNode schematic, RegionType regionType, RegionExtensionType regionExtensionType, boolean isTestBlock) throws IOException {
|
||||||
reset(schematic, regionType, regionExtensionType, false);
|
reset(schematic, regionType, regionExtensionType, false, isTestBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset(File file) {
|
public void reset(File file) {
|
||||||
@ -435,11 +435,11 @@ public class Region {
|
|||||||
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 isTestBlock) throws IOException {
|
||||||
reset(schematic, regionType, regionExtensionType, ignoreAir, false);
|
reset(schematic, regionType, regionExtensionType, ignoreAir, false, isTestBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
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 isTestBlock) 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);
|
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);
|
||||||
|
|
||||||
Point pastePoint;
|
Point pastePoint;
|
||||||
File tempFile = null;
|
File tempFile = null;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren