Package io.github.ennuil.libzoomer.api
Interface MouseModifier
- All Known Implementing Classes:
CinematicCameraMouseModifier,ContainingMouseModifier,SpyglassMouseModifier,ZoomDivisorMouseModifier
public interface MouseModifier
The mouse modifier is the sub-instance that handles any change of behavior of the mouse.
-
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.resources.ResourceLocationgetId()Gets the identifier of the mouse modifier.voidtick(boolean active) The tick method.
-
Method Details
-
getId
net.minecraft.resources.ResourceLocation getId()Gets the identifier of the mouse modifier.- Returns:
- the mouse modifier's identifier
-
getActive
boolean getActive()Gets the active state of the mouse modifier.- Returns:
- the mouse modifier's active state
-
applyXModifier
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.- 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
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.- 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
void tick(boolean active) The tick method. Used in order to keep the internal variables accurate.- Parameters:
active- the zoom state
-