mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 08:17:44 +01:00
#1185: Add API for directly setting Display transformation matrices
By: Cerus <github.social@cerus.dev>
This commit is contained in:
parent
dafbbb0363
commit
7b7d756683
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user