Fix bug with variant-rotation not beeing applied correctly for lowres coloring

This commit is contained in:
Lukas Rieger (Blue) 2023-03-04 18:43:28 +01:00
parent f3f609c573
commit 22ed75c513
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2

View File

@ -322,9 +322,8 @@ private void createElementFace(Element element, Direction faceDir, VectorM3f c0,
faceDirVector.getY(),
faceDirVector.getZ()
);
makeRotationRelative(faceRotationVector);
faceRotationVector.rotateAndScale(element.getRotation().getMatrix());
if (variant.isRotated()) faceRotationVector.transform(variant.getRotationMatrix());
makeRotationRelative(faceRotationVector);
float a = faceRotationVector.y;
if (a > 0 && texturePath != null){
@ -375,7 +374,8 @@ private ExtendedBlock<?> getRotationRelativeBlock(int dx, int dy, int dz){
}
private void makeRotationRelative(VectorM3f direction){
direction.transform(variant.getRotationMatrix());
if (variant.isRotated())
direction.transform(variant.getRotationMatrix());
}
private float testAo(VectorM3f vertex, Direction dir){