Add Extensions #187
@ -229,6 +229,15 @@ public class Region {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum ExtensionDirection {
|
||||||
|
|
||||||
|
PositiveZ(),
|
||||||
|
NegativeZ(),
|
||||||
|
PositiveX(),
|
||||||
|
NegativeX()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static class Prototype{
|
public static class Prototype{
|
||||||
private static final Map<String, Prototype> prototypes = new HashMap<>();
|
private static final Map<String, Prototype> prototypes = new HashMap<>();
|
||||||
|
|
||||||
@ -240,6 +249,7 @@ public class Region {
|
|||||||
private final int offsetY;
|
private final int offsetY;
|
||||||
private final int offsetZ;
|
private final int offsetZ;
|
||||||
|
|
||||||
|
private final ExtensionDirection extensionFrontDirection;
|
||||||
private final int extensionFront;
|
private final int extensionFront;
|
||||||
private final int extensionBack;
|
private final int extensionBack;
|
||||||
private final int extensionUp;
|
private final int extensionUp;
|
||||||
@ -261,6 +271,28 @@ public class Region {
|
|||||||
offsetX = config.getInt("offsetX", 0);
|
offsetX = config.getInt("offsetX", 0);
|
||||||
offsetY = config.getInt("offsetY", 0);
|
offsetY = config.getInt("offsetY", 0);
|
||||||
offsetZ = config.getInt("offsetZ", 0);
|
offsetZ = config.getInt("offsetZ", 0);
|
||||||
|
String extDir = config.getString("extensionFrontDirection", null);
|
||||||
|
if (extDir == null) extensionFrontDirection = null;
|
||||||
|
else {
|
||||||
|
ExtensionDirection extDirection = null;
|
||||||
|
switch (extDir.toLowerCase()) {
|
||||||
|
case "positivex":
|
||||||
|
extDirection = ExtensionDirection.PositiveX;
|
||||||
|
break;
|
||||||
|
case "negativex":
|
||||||
|
extDirection = ExtensionDirection.NegativeX;
|
||||||
|
break;
|
||||||
|
case "positivez":
|
||||||
|
extDirection = ExtensionDirection.PositiveZ;
|
||||||
|
break;
|
||||||
|
case "negativez":
|
||||||
|
extDirection = ExtensionDirection.NegativeZ;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
extensionFrontDirection = extDirection;
|
||||||
|
}
|
||||||
extensionFront = config.getInt("extensionFront", 0);
|
extensionFront = config.getInt("extensionFront", 0);
|
||||||
extensionBack = config.getInt("extensionBack", 0);
|
extensionBack = config.getInt("extensionBack", 0);
|
||||||
extensionUp = config.getInt("extensionUp", 0);
|
extensionUp = config.getInt("extensionUp", 0);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren