Class ContainingMouseModifier

java.lang.Object
io.github.ennuil.libzoomer.api.modifiers.ContainingMouseModifier
All Implemented Interfaces:
MouseModifier

public class ContainingMouseModifier extends Object implements MouseModifier
A mouse modifier that contains multiple mouse modifiers.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initializes an instance of the containing mouse modifier
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    applyXModifier(double cursorDeltaX, double cursorSensitivity, double mouseUpdateTimeDelta, double targetDivisor, double transitionMultiplier)
    Modifies the cursor's X delta to the value returned on this method.
    double
    applyYModifier(double cursorDeltaY, double cursorSensitivity, double mouseUpdateTimeDelta, double targetDivisor, double transitionMultiplier)
    Modifies the cursor's Y delta to the value returned on this method.
    boolean
    Gets the active state of the mouse modifier.
    net.minecraft.util.Identifier
    Gets the identifier of the mouse modifier.
    void
    tick(boolean active)
    The tick method.

    Methods inherited from class java.lang.Object

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

    • ContainingMouseModifier

      public ContainingMouseModifier(MouseModifier... modifiers)
      Initializes an instance of the containing mouse modifier
      Parameters:
      modifiers - the contained mouse modifiers
  • Method Details

    • getIdentifier

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

      public boolean getActive()
      Description copied from interface: MouseModifier
      Gets the active state of the mouse modifier.
      Specified by:
      getActive in interface MouseModifier
      Returns:
      the mouse modifier's active state
    • applyXModifier

      public double applyXModifier(double cursorDeltaX, double cursorSensitivity, double mouseUpdateTimeDelta, double targetDivisor, double transitionMultiplier)
      Description copied from interface: MouseModifier
      Modifies the cursor's X delta to the value returned on this method.
      Specified by:
      applyXModifier in interface MouseModifier
      Parameters:
      cursorDeltaX - the X delta after the calculations
      cursorSensitivity - the cursor sensitivity that is applied to the cursor delta
      mouseUpdateTimeDelta - the delta of the mouse update time
      targetDivisor - the current zoom divisor
      transitionMultiplier - the transition mode's internal multiplier
      Returns:
      the X delta that will replace the cursor's one
    • applyYModifier

      public double applyYModifier(double cursorDeltaY, double cursorSensitivity, double mouseUpdateTimeDelta, double targetDivisor, double transitionMultiplier)
      Description copied from interface: MouseModifier
      Modifies the cursor's Y delta to the value returned on this method.
      Specified by:
      applyYModifier in interface MouseModifier
      Parameters:
      cursorDeltaY - the Y delta after the calculations
      cursorSensitivity - the cursor sensitivity that is applied to the cursor delta
      mouseUpdateTimeDelta - the delta of the mouse update time
      targetDivisor - the current zoom divisor
      transitionMultiplier - the transition mode's internal multiplier
      Returns:
      the Y delta that will replace the cursor's Y delta
    • tick

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