fix translation not rotating

This commit is contained in:
CrazyDev22 2024-05-16 13:12:49 +02:00
parent 6ddb0b5304
commit 44500d6af9

View File

@ -101,6 +101,11 @@ public class IrisObjectRotation {
i.setPosition(rotate(i.getPosition()));
i.setDirection(rotate(i.getDirection()));
}
try {
var translate = piece.getPlacementOptions().getTranslate();
var pos = rotate(new IrisPosition(translate.getX(), translate.getY(), translate.getZ()));
translate.setX(pos.getX()).setY(pos.getY()).setZ(pos.getZ());
} catch (NullPointerException ignored) {}
return piece;
}