Class BlockDisplayHelper
java.lang.Object
nl.pim16aap2.animatedarchitecture.spigot.core.animation.BlockDisplayHelper
Helper class for BlockDisplay entities.
-
Method Summary
Modifier and TypeMethodDescriptionorg.joml.QuaternionffromRollPitchYaw(float roll, float pitch, float yaw) Creates a quaternion from roll, pitch and yaw.voidmoveToTarget(@Nullable org.bukkit.entity.BlockDisplay entity, RotatedPosition startPosition, RotatedPosition target) Moves an entity from the start position to the target position.
-
Method Details
-
moveToTarget
public void moveToTarget(@Nullable @Nullable org.bukkit.entity.BlockDisplay entity, RotatedPosition startPosition, RotatedPosition target) Moves an entity from the start position to the target position.This method updates the transformation of the entity to move it from the start position to the target position.
- Parameters:
entity- The entity to move. If null, this method does nothing.startPosition- The start position of the entity. This is original position the entity was created at.target- The target position of the entity.
-
fromRollPitchYaw
public org.joml.Quaternionf fromRollPitchYaw(float roll, float pitch, float yaw) Creates a quaternion from roll, pitch and yaw.- Parameters:
roll- The roll. Rotation around the z-axis measured in radians.pitch- The pitch. Rotation around the x-axis measured in radians.yaw- The yaw. Rotation around the y-axis measured in radians.- Returns:
- The quaternion representing the rotation.
-