Fix Region.generatePrototypeData
Dieser Commit ist enthalten in:
Ursprung
63c376fd4e
Commit
1c1ed8cdf7
@ -82,7 +82,11 @@ public class Region {
|
||||
});
|
||||
}
|
||||
this.flagStorage = flagStorage;
|
||||
generatePrototypeData(prototype, regionConfig.getPlainValue("minPoint"));
|
||||
Point point = null;
|
||||
if (regionConfig.containsKey("minX", Integer.class) && regionConfig.containsKey("minY", Integer.class) && regionConfig.containsKey("minZ", Integer.class)) {
|
||||
point = new Point(regionConfig.getPlainValue("minX"), regionConfig.getPlainValue("minY"), regionConfig.getPlainValue("minZ"));
|
||||
}
|
||||
generatePrototypeData(prototype, point);
|
||||
}
|
||||
|
||||
private void generatePrototypeData(Prototype prototype, Point point) {
|
||||
@ -98,18 +102,22 @@ public class Region {
|
||||
this.minPoint = point;
|
||||
this.maxPoint = point.add(prototype.getSizeX(), prototype.getSizeY(), prototype.getSizeZ());
|
||||
|
||||
if (prototype.getTestblock() != null) {
|
||||
this.minPointTestblock = point.add(prototype.getTestblock().getOffsetX(), prototype.getTestblock().getOffsetY(), prototype.getTestblock().getOffsetZ());
|
||||
this.maxPointTestblock = this.minPointTestblock.add(prototype.getTestblock().getSizeX(), prototype.getTestblock().getSizeY(), prototype.getTestblock().getSizeZ());
|
||||
|
||||
this.minPointTestblockExtension = this.minPointTestblock.substract(prototype.getTestblock().getExtensionNegativeX(), prototype.getTestblock().getExtensionNegativeY(), prototype.getTestblock().getExtensionNegativeZ());
|
||||
this.maxPointTestblockExtension = this.maxPointTestblock.add(prototype.getTestblock().getExtensionPositiveX(), prototype.getTestblock().getExtensionPositiveY(), prototype.getTestblock().getExtensionPositiveZ());
|
||||
}
|
||||
|
||||
if (prototype.getBuild() != null) {
|
||||
this.minPointBuild = point.add(prototype.getBuild().getOffsetX(), prototype.getBuild().getOffsetY(), prototype.getBuild().getOffsetZ());
|
||||
this.maxPointBuild = this.minPointBuild.add(prototype.getBuild().getSizeX(), prototype.getBuild().getSizeY(), prototype.getBuild().getSizeZ());
|
||||
|
||||
this.minPointBuildExtension = this.minPointBuild.substract(prototype.getBuild().getExtensionNegativeX(), prototype.getBuild().getExtensionNegativeY(), prototype.getBuild().getExtensionNegativeZ());
|
||||
this.maxPointBuildExtension = this.maxPointBuild.add(prototype.getBuild().getExtensionPositiveX(), prototype.getBuild().getExtensionPositiveY(), prototype.getBuild().getExtensionPositiveZ());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean inRegion(Location location, RegionType regionType, RegionExtensionType regionExtensionType) {
|
||||
if (!hasType(regionType)) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren