Class NoopTransition

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

public class NoopTransition extends Object implements Transition
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.thewinnt.cutscenes.transition.Transition

    Transition.TransitionSerializer<T extends Transition>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJSON(com.google.gson.JsonObject json)
     
    fromNetwork(net.minecraft.network.FriendlyByteBuf buf)
     
    int
     
    int
    Returns the time that will be added to the total cutscene time as a result of this transition running.
    int
    Returns the time of this transition that will be taken from the cutscene's time.
    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)
    Returns the camera position at the specified moment
    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)
    Returns the camera rotation at the specified moment
     
    void
    toNetwork(net.minecraft.network.FriendlyByteBuf buf)
    Saves this transition for network transfer, so that it can be fully recreated on the receiving end.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.thewinnt.cutscenes.transition.Transition

    onEnd, onFrame, onStart
  • Constructor Details

    • NoopTransition

      public NoopTransition()
  • Method Details

    • getLength

      public int getLength()
      Specified by:
      getLength in interface Transition
      Returns:
      the total length of this transition.
    • 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
    • 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
    • fromNetwork

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

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