#1185: Add API for directly setting Display transformation matrices

This commit is contained in:
Cerus 2023-05-11 06:48:40 +10:00 committed by md_5
parent a7cfc778fd
commit bcc85ef670
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -42,6 +42,13 @@ public class CraftDisplay extends CraftEntity implements Display {
getHandle().setTransformation(new com.mojang.math.Transformation(transformation.getTranslation(), transformation.getLeftRotation(), transformation.getScale(), transformation.getRightRotation()));
}
@Override
public void setTransformationMatrix(org.joml.Matrix4f transformationMatrix) {
Preconditions.checkArgument(transformationMatrix != null, "Transformation matrix cannot be null");
getHandle().setTransformation(new com.mojang.math.Transformation(transformationMatrix));
}
@Override
public int getInterpolationDuration() {
return getHandle().getInterpolationDuration();