TestBlockPaste-Without-Water #146
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.utils;
|
package de.steamwar.bausystem.utils;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableMap;
|
||||||
|
import com.sk89q.jnbt.CompoundTag;
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
import com.sk89q.worldedit.WorldEditException;
|
import com.sk89q.worldedit.WorldEditException;
|
||||||
@ -42,8 +44,9 @@ import com.sk89q.worldedit.regions.selector.CuboidRegionSelector;
|
|||||||
import com.sk89q.worldedit.session.ClipboardHolder;
|
import com.sk89q.worldedit.session.ClipboardHolder;
|
||||||
import com.sk89q.worldedit.world.World;
|
import com.sk89q.worldedit.world.World;
|
||||||
zOnlyKroks markierte diese Unterhaltung als gelöst
Veraltet
|
|||||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||||
|
import com.sk89q.worldedit.world.block.BlockState;
|
||||||
|
import com.sk89q.worldedit.world.block.BlockType;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||||
import de.steamwar.bausystem.BauSystem;
|
|
||||||
import de.steamwar.bausystem.region.Color;
|
import de.steamwar.bausystem.region.Color;
|
||||||
zOnlyKroks markierte diese Unterhaltung als gelöst
Veraltet
YoyoNow
hat
Dieser Import bitte raus! Dieser Import bitte raus!
|
|||||||
import de.steamwar.bausystem.region.PasteOptions;
|
import de.steamwar.bausystem.region.PasteOptions;
|
||||||
import de.steamwar.bausystem.region.Point;
|
import de.steamwar.bausystem.region.Point;
|
||||||
@ -61,7 +64,10 @@ import java.io.File;
|
|||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.Arrays;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class FlatteningWrapper15 implements FlatteningWrapper {
|
public class FlatteningWrapper15 implements FlatteningWrapper {
|
||||||
|
@ -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);
|
||||||
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, true);
|
region.reset(node, RegionType.TESTBLOCK, regionExtensionType);
|
||||||
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);
|
||||||
|
@ -28,44 +28,20 @@ import lombok.Getter;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class PasteOptions {
|
public class PasteOptions {
|
||||||
|
|
||||||
/**
|
|
||||||
* Used in 1.15
|
|
||||||
*/
|
|
||||||
private final boolean rotate;
|
private final boolean rotate;
|
||||||
|
|
||||||
/**
|
|
||||||
* Used in 1.15
|
|
||||||
*/
|
|
||||||
private final boolean ignoreAir;
|
private final boolean ignoreAir;
|
||||||
|
|
||||||
/**
|
|
||||||
* Used in 1.15
|
|
||||||
*/
|
|
||||||
private final Color color;
|
private final Color color;
|
||||||
|
|
||||||
/**
|
|
||||||
* Used in 1.15
|
|
||||||
*/
|
|
||||||
private final boolean onlyColors;
|
private final boolean onlyColors;
|
||||||
|
|
||||||
/**
|
|
||||||
* Used in 1.15
|
|
||||||
*/
|
|
||||||
private final boolean reset;
|
private final boolean reset;
|
||||||
|
|
||||||
/**
|
|
||||||
* Used in 1.15
|
|
||||||
*/
|
|
||||||
private final Point minPoint;
|
private final Point minPoint;
|
||||||
|
|
||||||
/**
|
|
||||||
* Used in 1.15
|
|
||||||
*/
|
|
||||||
private final Point maxPoint;
|
private final Point maxPoint;
|
||||||
|
|
||||||
/**
|
|
||||||
* Used in 1.15
|
|
||||||
*/
|
|
||||||
private final int waterLevel;
|
private final int waterLevel;
|
||||||
|
|
||||||
private final boolean testBlock;
|
private final boolean testBlock;
|
||||||
|
@ -421,12 +421,12 @@ 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);
|
||||||
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, 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) {
|
||||||
@ -435,11 +435,11 @@ public class Region {
|
|||||||
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, regionType == RegionType.TESTBLOCK);
|
||||||
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
Scheint mir nicht genutzt zu sein.