Class SmoothEaseTransition

java.lang.Object
net.thewinnt.cutscenes.transition.SmoothEaseTransition
All Implemented Interfaces:
Transition

public class SmoothEaseTransition extends Object implements Transition
  • Constructor Details

    • SmoothEaseTransition

      public SmoothEaseTransition(int length, boolean countTowardsCutsceneTime, boolean isStart)
    • SmoothEaseTransition

      public SmoothEaseTransition(int length, boolean countTowardsCutsceneTime, boolean isStart, Easing easingX, Easing easingY, Easing easingZ, Easing easingRotX, Easing easingRotY, Easing easingRotZ)
  • Method Details

    • getLength

      public int getLength()
      Specified by:
      getLength in interface Transition
      Returns:
      the total length of this transition.
    • getOffCutsceneTime

      public int getOffCutsceneTime()
      Description copied from interface: Transition
      Returns the time that will be added to the total cutscene time as a result of this transition running. Should not change during a cutscene.
      Specified by:
      getOffCutsceneTime in interface Transition
      Returns:
      the time spent outside the cutscene's length
    • getOnCutsceneTime

      public int getOnCutsceneTime()
      Description copied from interface: Transition
      Returns the time of this transition that will be taken from the cutscene's time. This means that the cutscene itself will be running, so a path will be shown.
      Specified by:
      getOnCutsceneTime in interface Transition
      Returns:
      the time spent inside the cutscene's length
    • getPos

      public net.minecraft.world.phys.Vec3 getPos(double progress, net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 startPos, net.minecraft.world.phys.Vec3 pathRot, net.minecraft.world.phys.Vec3 initCamPos, CutsceneType cutscene)
      Description copied from interface: Transition
      Returns the camera position at the specified moment
      Specified by:
      getPos in interface Transition
      Parameters:
      progress - the progress of the transition [0-1]
      level - the level the transition is executed in
      startPos - the cutscene start position (specified in the command, defaults to [0, 100, 0])
      pathRot - the rotation of the path
      initCamPos - the camera position right before the cutscene started
      cutscene - the cutscene the transition is associated with
    • getRot

      public net.minecraft.world.phys.Vec3 getRot(double progress, net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 startPos, net.minecraft.world.phys.Vec3 startRot, net.minecraft.world.phys.Vec3 initCamRot, CutsceneType cutscene)
      Description copied from interface: Transition
      Returns the camera rotation at the specified moment
      Specified by:
      getRot in interface Transition
      Parameters:
      progress - the progress of the transition [0-1]
      level - the level the transition is executed in
      startPos - the cutscene start position (world coordinates)
      startRot - the start rotation (specified in the command defaults to [0, 0, 0])
      initCamRot - the camera rotation right before the cutscene started
      cutscene - the cutscene the transition is associated with
    • toNetwork

      public void toNetwork(net.minecraft.network.FriendlyByteBuf buf)
      Description copied from interface: Transition
      Saves this transition for network transfer, so that it can be fully recreated on the receiving end.
      Specified by:
      toNetwork in interface Transition
      Parameters:
      buf - the buffer to write to
    • getSerializer

      public Transition.TransitionSerializer<?> getSerializer()
      Specified by:
      getSerializer in interface Transition
      Returns:
      a serializer that creates transitions of this type
    • fromNetwork

      public static SmoothEaseTransition fromNetwork(net.minecraft.network.FriendlyByteBuf buf)
    • fromJSON

      public static SmoothEaseTransition fromJSON(com.google.gson.JsonObject json)