From 93469fb3b45228417bddfe1212a999b1d0d79c92 Mon Sep 17 00:00:00 2001 From: CrazyDev22 Date: Wed, 1 May 2024 20:01:10 +0200 Subject: [PATCH] include translate option into the bounding box of jigsaw pieces --- .../com/volmit/iris/engine/jigsaw/PlannedPiece.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/volmit/iris/engine/jigsaw/PlannedPiece.java b/core/src/main/java/com/volmit/iris/engine/jigsaw/PlannedPiece.java index 08088ac38..cf0ef0dc0 100644 --- a/core/src/main/java/com/volmit/iris/engine/jigsaw/PlannedPiece.java +++ b/core/src/main/java/com/volmit/iris/engine/jigsaw/PlannedPiece.java @@ -97,7 +97,15 @@ public class PlannedPiece { } BlockVector v = getObject().getCenter(); - box = object.getAABB().shifted(position.add(new IrisPosition(object.getCenter()))); + IrisPosition pos = new IrisPosition(); + IrisObjectPlacement options = piece.getPlacementOptions(); + if (options != null && options.getTranslate() != null) { + IrisObjectTranslate translate = options.getTranslate(); + pos.setX(translate.getX()); + pos.setY(translate.getY()); + pos.setZ(translate.getZ()); + } + box = object.getAABB().shifted(position.add(new IrisPosition(object.getCenter())).add(pos)); return box; }