Interface TransitionMode

All Known Implementing Classes:
InstantTransitionMode, SmoothTransitionMode

public interface TransitionMode
The transition mode is a sub-instance that handles zooming itself. It handles how the regular FOV will transition to the zoomed FOV and vice-versa.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    applyZoom(double fov, float tickDelta)
    Applies the zoom to the FOV.
    boolean
    Gets the active state of the transition mode.
    net.minecraft.util.Identifier
    Gets the identifier of the transition mode.
    double
    Gets the internal multiplier.
    void
    tick(boolean active, double divisor)
    The tick method.
  • Method Details

    • getIdentifier

      net.minecraft.util.Identifier getIdentifier()
      Gets the identifier of the transition mode.
      Returns:
      the transition mode's identifier
    • getActive

      boolean getActive()
      Gets the active state of the transition mode.
      Returns:
      the transition mode's active state
    • applyZoom

      double applyZoom(double fov, float tickDelta)
      Applies the zoom to the FOV.
      Parameters:
      fov - the original FOV
      tickDelta - the current tick delta
      Returns:
      the zoomed FOV
    • tick

      void tick(boolean active, double divisor)
      The tick method. Used in order to keep the internal variables accurate.
      Parameters:
      active - the zoom state
      divisor - the zoom divisor
    • getInternalMultiplier

      double getInternalMultiplier()
      Gets the internal multiplier. Used for purposes other than zooming the FOV.
      Returns:
      the internal multiplier