Interface Keyframe<V>

Type Parameters:
V - The type of value stored in the keyframe.
All Superinterfaces:
Wrapper

@NullMarked @AsOf("3.2.0") public interface Keyframe<V> extends Wrapper
Represents a keyframe in a timeline.
Since:
3.2.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Creates a new keyframe builder.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <V> Keyframe<V>
    of(int ticks, V value)
    Creates a new keyframe with the given ticks and value.
    int
    The number of ticks in this keyframe occurs at.
    Creates a new builder with the same values as this keyframe.
    The value stored in this keyframe.

    Methods inherited from interface Wrapper

    asHandle, toMinecraft, unwrap
  • Method Details

    • ticks

      @AsOf("3.2.0") int ticks()
      The number of ticks in this keyframe occurs at.
      Returns:
      the number of ticks this keyframe occurs at
      Since:
      3.2.0
    • value

      @AsOf("3.2.0") V value()
      The value stored in this keyframe.
      Returns:
      the value stored in this keyframe
      Since:
      3.2.0
    • toBuilder

      @AsOf("3.3.0") default Keyframe.Builder<V> toBuilder()
      Creates a new builder with the same values as this keyframe.
      Returns:
      a new builder with the same values
      Since:
      3.3.0
    • of

      @AsOf("3.2.0") static <V> Keyframe<V> of(int ticks, V value)
      Creates a new keyframe with the given ticks and value.
      Type Parameters:
      V - the type of value stored in the keyframe
      Parameters:
      ticks - the number of ticks this keyframe occurs at
      value - the value stored in this keyframe
      Returns:
      a new keyframe with the given ticks and value
      Since:
      3.2.0