mathUtil
Calculates the rotation (yaw and pitch) needed to aim from one vector position to another. from
and to
are Vec3
objects representing the start and end positions, respectively. Returns a float array containing the yaw and pitch values.
Interpolates between two vector positions over time. from
and to
are Vec3
objects representing the start and end positions, while partialTicks
is a float value representing the fraction of time between the two positions. Returns the interpolated Vec3
position.
Calculates the interpolated position of an entity based on its last and current positions. entity
is an Entity
object representing the entity, and partialTicks
is a float value for the interpolation factor. Returns the interpolated Vec3
position of the entity.
Returns the interpolated bounding box of an entity. entity
is an Entity
object representing the entity, and partialTicks
is a float value for the interpolation factor. This method calculates the interpolated position of the entity's bounding box and returns it as an AxisAlignedBB
.
lerp(float start, float end, float progress): float
lerp(float start, float end, float progress): float
Linearly interpolates between two float values. start
and end
are the initial and final values, respectively, while progress
represents the interpolation factor. Returns the interpolated float value.
Interpolates between two colors. start
and end
are Color
objects representing the initial and final colors,
directionSpeed(float forward, float strafe, float yaw, float speed): double[]
directionSpeed(float forward, float strafe, float yaw, float speed): double[]
Calculates the movement with the forward
, strafe
, yaw
and speed
. Returns a array with the x motion and the y motion.
Last updated