Class Cutscene.Builder

java.lang.Object
net.ixdarklord.coolcatcanvas.api.cutscene.Cutscene.Builder
Enclosing class:
Cutscene

public static final class Cutscene.Builder extends Object
Builds a Cutscene. Calls that shape a keyframe act on the one added last.
  • Method Details

    • keyframe

      public Cutscene.Builder keyframe(float time, net.minecraft.world.phys.Vec3 position, float yaw, float pitch)
      A keyframe reached along a smooth curve at an even pace; shape it with the calls below.
    • keyframe

      public Cutscene.Builder keyframe(CameraKeyframe keyframe)
    • keyframes

      public Cutscene.Builder keyframes(List<CameraKeyframe> keyframes)
      Replaces every keyframe.
    • easing

      public Cutscene.Builder easing(Easing easing)
      How the move into the last keyframe is paced.
    • interpolation

      public Cutscene.Builder interpolation(Interpolation interpolation)
      The shape of the move into the last keyframe.
    • cut

      public Cutscene.Builder cut()
      Cuts to the last keyframe instead of moving into it.
    • roll

      public Cutscene.Builder roll(float degrees)
      The last keyframe's tilt around the line of sight, in degrees.
    • fov

      public Cutscene.Builder fov(float degrees)
      The last keyframe's field of view, in degrees: narrow to zoom in.
    • duration

      public Cutscene.Builder duration(float ticks)
      How long it lasts, in ticks; the last keyframe's time unless set. Longer holds the last keyframe.
    • anchor

      public Cutscene.Builder anchor(CutsceneAnchor anchor)
    • letterbox

      public Cutscene.Builder letterbox()
      Letterbox bars framing the cinema ratio (Cutscene.CINEMATIC_ASPECT), sliding in at the start and out at the end.
    • letterbox

      public Cutscene.Builder letterbox(float aspect)
      Letterbox bars framing an aspect ratio (width over height): top and bottom on a taller screen, left and right on a wider one. 0 for none.
    • bars

      public Cutscene.Builder bars(ValueTrack bars)
      How far the bars are in over time, 0 to 1, in place of sliding in at the start and out at the end.
    • fadeIn

      public Cutscene.Builder fadeIn(float ticks)
      Starts on a covered screen that clears over these ticks.
    • fadeOut

      public Cutscene.Builder fadeOut(float ticks)
      Ends on a covered screen, covering it over the last of these ticks.
    • fade

      public Cutscene.Builder fade(ValueTrack fade)
      How dark the screen is over time, 0 to 1, for fades in the middle; replaces fadeIn and fadeOut.
    • fadeColor

      public Cutscene.Builder fadeColor(int rgb)
      The colour faded to, as 0xRRGGBB; black unless set.
    • focus

      public Cutscene.Builder focus(CameraFocus focus)
    • lookAt

      public Cutscene.Builder lookAt(net.minecraft.world.phys.Vec3 point)
      Keeps the camera looking at a point, in the cutscene's own space, for the whole cutscene.
    • subtitle

      public Cutscene.Builder subtitle(float start, float duration, net.minecraft.network.chat.Component text)
    • marker

      public Cutscene.Builder marker(float time, net.minecraft.resources.Identifier id)
    • blendIn

      public Cutscene.Builder blendIn(float ticks)
      Glides from the player's own view into the first keyframe over these ticks, instead of cutting to it.
    • blendOut

      public Cutscene.Builder blendOut(float ticks)
      Glides back to the player's own view over the last of these ticks.
    • hideHud

      public Cutscene.Builder hideHud(boolean hide)
      Whether the HUD and the player's hand are hidden while it plays; they are unless set.
    • lockInput

      public Cutscene.Builder lockInput(boolean lock)
      Whether the player is held still while it plays; they are unless set.
    • skippable

      public Cutscene.Builder skippable(boolean skippable)
      Whether the player can skip it by holding the skip key; they can unless set.
    • editable

      public Cutscene.Builder editable(boolean editable)
      Whether players can open it in the in-game editor; they can unless set. Turn it off for a cutscene that is part of a mod's story. Registered from code, such a cutscene can be neither replaced by a resource pack nor copied through the editor.
    • build

      public Cutscene build()
      Throws:
      IllegalArgumentException - with no keyframes, two at the same time, or one keyframe and no duration