ModelDatapoint

@ApiStatus.Internal
class ModelDatapoint : Record

Represents a single data point within a keyframe, which can be a static value or a Molang script.

This record holds the raw JSON values for x, y, and z coordinates, or a script string.

Since

1.15.2

Parameters

x

the x-coordinate value or script

y

the y-coordinate value or script

z

the z-coordinate value or script

script

the script string (used for sound/particle effects)

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
open fun hasScript(): Boolean
Checks if this data point contains a script.
Link copied to clipboard
@NotNull
open fun script(): @NotNull String
Returns the script string.
Link copied to clipboard
@NotNull
open fun toFunction(@NotNull context: @NotNull ModelLoadContext): @NotNull FloatFunction<Vector3f>
Converts this data point into a function that returns a Vector3f.
Link copied to clipboard
abstract fun toString(): String