Class InstantTransitionMode

java.lang.Object
io.github.ennuil.libzoomer.api.transitions.InstantTransitionMode
All Implemented Interfaces:
TransitionMode

public class InstantTransitionMode extends Object implements TransitionMode
An implementation of a simple zoom as a transition mode.
  • Constructor Details

    • InstantTransitionMode

      public InstantTransitionMode()
      Initializes an instance of the instant transition mode.
  • Method Details

    • getIdentifier

      public net.minecraft.util.Identifier getIdentifier()
      Description copied from interface: TransitionMode
      Gets the identifier of the transition mode.
      Specified by:
      getIdentifier in interface TransitionMode
      Returns:
      the transition mode's identifier
    • getActive

      public boolean getActive()
      Description copied from interface: TransitionMode
      Gets the active state of the transition mode.
      Specified by:
      getActive in interface TransitionMode
      Returns:
      the transition mode's active state
    • applyZoom

      public double applyZoom(double fov, float tickDelta)
      Description copied from interface: TransitionMode
      Applies the zoom to the FOV.
      Specified by:
      applyZoom in interface TransitionMode
      Parameters:
      fov - the original FOV
      tickDelta - the current tick delta
      Returns:
      the zoomed FOV
    • tick

      public void tick(boolean active, double divisor)
      Description copied from interface: TransitionMode
      The tick method. Used in order to keep the internal variables accurate.
      Specified by:
      tick in interface TransitionMode
      Parameters:
      active - the zoom state
      divisor - the zoom divisor
    • getInternalMultiplier

      public double getInternalMultiplier()
      Description copied from interface: TransitionMode
      Gets the internal multiplier. Used for purposes other than zooming the FOV.
      Specified by:
      getInternalMultiplier in interface TransitionMode
      Returns:
      the internal multiplier