Class ZoomDivisorMouseModifier
java.lang.Object
io.github.ennuil.libzoomer.api.modifiers.ZoomDivisorMouseModifier
- All Implemented Interfaces:
MouseModifier
A mouse modifier which reduces the cursor sensitivity with the transition mode's internal multiplier
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes an instance of the zoom divisor mouse modifier. -
Method Summary
Modifier and TypeMethodDescriptiondoubleapplyXModifier(double cursorDeltaX, double cursorSensitivity, double mouseUpdateTimeDelta, double targetDivisor, double transitionMultiplier) Modifies the cursor's X delta to the value returned on this method.doubleapplyYModifier(double cursorDeltaY, double cursorSensitivity, double mouseUpdateTimeDelta, double targetDivisor, double transitionMultiplier) Modifies the cursor's Y delta to the value returned on this method.booleanGets the active state of the mouse modifier.net.minecraft.util.IdentifierGets the identifier of the mouse modifier.voidtick(boolean active) The tick method.
-
Constructor Details
-
ZoomDivisorMouseModifier
public ZoomDivisorMouseModifier()Initializes an instance of the zoom divisor mouse modifier.
-
-
Method Details
-
getIdentifier
public net.minecraft.util.Identifier getIdentifier()Description copied from interface:MouseModifierGets the identifier of the mouse modifier.- Specified by:
getIdentifierin interfaceMouseModifier- Returns:
- the mouse modifier's identifier
-
getActive
public boolean getActive()Description copied from interface:MouseModifierGets the active state of the mouse modifier.- Specified by:
getActivein interfaceMouseModifier- 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:MouseModifierModifies the cursor's X delta to the value returned on this method.- Specified by:
applyXModifierin interfaceMouseModifier- Parameters:
cursorDeltaX- the X delta after the calculationscursorSensitivity- the cursor sensitivity that is applied to the cursor deltamouseUpdateTimeDelta- the delta of the mouse update timetargetDivisor- the current zoom divisortransitionMultiplier- 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:MouseModifierModifies the cursor's Y delta to the value returned on this method.- Specified by:
applyYModifierin interfaceMouseModifier- Parameters:
cursorDeltaY- the Y delta after the calculationscursorSensitivity- the cursor sensitivity that is applied to the cursor deltamouseUpdateTimeDelta- the delta of the mouse update timetargetDivisor- the current zoom divisortransitionMultiplier- 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:MouseModifierThe tick method. Used in order to keep the internal variables accurate.- Specified by:
tickin interfaceMouseModifier- Parameters:
active- the zoom state
-