#1185: Add API for directly setting Display transformation matrices

By: Cerus <github.social@cerus.dev>
This commit is contained in:
CraftBukkit/Spigot 2023-05-11 06:48:40 +10:00
parent dafbbb0363
commit 7b7d756683

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();