Class EaseBackRotation

java.lang.Object
net.thewinnt.cutscenes.rotation.handler.EaseBackRotation
All Implemented Interfaces:
RotationHandler

public class EaseBackRotation extends Object implements RotationHandler
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double
     

    Fields inherited from interface net.thewinnt.cutscenes.rotation.RotationHandler

    UNKNOWN
  • Constructor Summary

    Constructors
    Constructor
    Description
    EaseBackRotation(double decay)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.phys.Vec3
    apply(net.minecraft.world.phys.Vec3 initCamRot, net.minecraft.world.phys.Vec3 startRot, net.minecraft.world.phys.Vec3 playerRot, net.minecraft.world.phys.Vec3 cutsceneRot, double dt)
    Applies the rotation transform.
    Returns a serializer suitable for this rotation handler

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • decay

      public final double decay
  • Constructor Details

    • EaseBackRotation

      public EaseBackRotation(double decay)
  • Method Details

    • apply

      public net.minecraft.world.phys.Vec3 apply(net.minecraft.world.phys.Vec3 initCamRot, net.minecraft.world.phys.Vec3 startRot, net.minecraft.world.phys.Vec3 playerRot, net.minecraft.world.phys.Vec3 cutsceneRot, double dt)
      Description copied from interface: RotationHandler
      Applies the rotation transform. There is at most one rotation handler ticked at any point in time, so you can freely store data in your instances.
      Specified by:
      apply in interface RotationHandler
      Parameters:
      initCamRot - the initial player rotation, right before the cutscene started
      startRot - the start rotation of the cutscene, aka the third argument in CutsceneManager#startCutscene
      playerRot - the current player rotation (as if the cutscene never began)
      cutsceneRot - the rotation value output by the cutscene, relative to zero
      dt - the time difference since last call of this method, in seconds. Always less than or equal to zero on the first call to this during a cutscene.
      Returns:
      the camera rotation that the player will ultimately see
    • serializer

      public RotationSerializer<?> serializer()
      Description copied from interface: RotationHandler
      Returns a serializer suitable for this rotation handler
      Specified by:
      serializer in interface RotationHandler
      Returns:
      a serializer that can be used with this rotation handler