Add Extensions #187
@ -229,26 +229,6 @@ public class Region {
|
||||
|
||||
}
|
||||
|
||||
public enum ExtensionDirection {
|
||||
PositiveZ("positivez", "z+"),
|
||||
NegativeZ("negativez", "z-"),
|
||||
PositiveX("positivex", "x+"),
|
||||
NegativeX("negativex", "x-");
|
||||
|
||||
private Set<String> values;
|
||||
ExtensionDirection(String... values) {
|
||||
this.values = new HashSet<>(Arrays.asList(values));
|
||||
}
|
||||
|
||||
private static ExtensionDirection getByString(String value) {
|
||||
for (ExtensionDirection extensionDirection : values()) {
|
||||
if (extensionDirection.values.contains(value)) return extensionDirection;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class Prototype{
|
||||
private static final Map<String, Prototype> prototypes = new HashMap<>();
|
||||
|
||||
@ -260,11 +240,10 @@ public class Region {
|
||||
private final int offsetY;
|
||||
private final int offsetZ;
|
||||
|
||||
private final ExtensionDirection extensionFrontDirection;
|
||||
private final int extensionFront;
|
||||
private final int extensionBack;
|
||||
private final int extensionUp;
|
||||
private final int extensionSides;
|
||||
private final int extensionPositiveZ;
|
||||
private final int extensionNegativeZ;
|
||||
private final int extensionPositiveY;
|
||||
private final int extensionAxisX;
|
||||
|
||||
private final String schematic;
|
||||
private final boolean rotate;
|
||||
@ -282,11 +261,10 @@ public class Region {
|
||||
offsetX = config.getInt("offsetX", 0);
|
||||
offsetY = config.getInt("offsetY", 0);
|
||||
offsetZ = config.getInt("offsetZ", 0);
|
||||
extensionFrontDirection = ExtensionDirection.getByString(config.getString("extensionFrontDirection", "").toLowerCase());
|
||||
extensionFront = config.getInt("extensionFront", 0);
|
||||
extensionBack = config.getInt("extensionBack", 0);
|
||||
extensionUp = config.getInt("extensionUp", 0);
|
||||
extensionSides = config.getInt("extensionSides", 0);
|
||||
extensionPositiveZ = config.getInt("extensionPositiveZ", 0);
|
||||
extensionNegativeZ = config.getInt("extensionNegativeZ", 0);
|
||||
extensionPositiveY = config.getInt("extensionPositiveY", 0);
|
||||
extensionAxisX = config.getInt("extensionAxisX", 0);
|
||||
rotate = config.getBoolean("rotate", false);
|
||||
|
||||
ConfigurationSection testblockSection = config.getConfigurationSection("testblock");
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren