]> git.lizzy.rs Git - BoundingBoxOutlineReloaded.git/blobdiff - src/main/java/com/irtimaled/bbor/common/StructureProcessor.java
Get 1.17.1 building
[BoundingBoxOutlineReloaded.git] / src / main / java / com / irtimaled / bbor / common / StructureProcessor.java
index 86c7dba8f7694c4dba755cd088af36c15bb24d0c..29ba726df909f57699058e5c37df1515deb44b36 100644 (file)
@@ -27,7 +27,9 @@ class StructureProcessor {
     private void addStructures(BoundingBoxType type, StructureStart<?> structureStart) {
         if (structureStart == null) return;
 
-        BlockBox bb = structureStart.getBoundingBox();
+        if (structureStart.hasNoChildren()) return;
+
+        BlockBox bb = structureStart.setBoundingBoxFromChildren();
         if (bb == null) return;
 
         AbstractBoundingBox boundingBox = buildStructure(bb, type);
@@ -41,8 +43,8 @@ class StructureProcessor {
     }
 
     private AbstractBoundingBox buildStructure(BlockBox bb, BoundingBoxType type) {
-        Coords min = new Coords(bb.minX, bb.minY, bb.minZ);
-        Coords max = new Coords(bb.maxX, bb.maxY, bb.maxZ);
+        Coords min = new Coords(bb.getMinX(), bb.getMinY(), bb.getMinZ());
+        Coords max = new Coords(bb.getMaxX(), bb.getMaxY(), bb.getMaxZ());
         return BoundingBoxCuboid.from(min, max, type);
     }