Class SpyglassZoomOverlay
java.lang.Object
io.github.ennuil.libzoomer.api.overlays.SpyglassZoomOverlay
- All Implemented Interfaces:
ZoomOverlay
An implementation of the spyglass overlay as a zoom overlay
-
Constructor Summary
ConstructorsConstructorDescriptionSpyglassZoomOverlay(net.minecraft.util.Identifier textureId) Initializes an instance of the spyglass mouse modifier with the specified texture identifier -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if the zoom overlay should cancel the rendering of anything rendered after that.booleanGets the active state of the zoom overlay.net.minecraft.util.IdentifierGets the identifier of the zoom overlay.voidrenderOverlay(net.minecraft.client.util.math.MatrixStack matrices) Renders the overlay itself.voidtick(boolean active, double divisor, double transitionMultiplier) The tick method.voidThe tick method used right before the overlay is rendered.
-
Constructor Details
-
SpyglassZoomOverlay
public SpyglassZoomOverlay(net.minecraft.util.Identifier textureId) Initializes an instance of the spyglass mouse modifier with the specified texture identifier- Parameters:
textureId- the texture identifier for the spyglass overlay
-
-
Method Details
-
getIdentifier
public net.minecraft.util.Identifier getIdentifier()Description copied from interface:ZoomOverlayGets the identifier of the zoom overlay.- Specified by:
getIdentifierin interfaceZoomOverlay- Returns:
- the zoom overlay's identifier
-
getActive
public boolean getActive()Description copied from interface:ZoomOverlayGets the active state of the zoom overlay.- Specified by:
getActivein interfaceZoomOverlay- Returns:
- the zoom overlay's active state
-
cancelOverlayRendering
public boolean cancelOverlayRendering()Description copied from interface:ZoomOverlayDetermines if the zoom overlay should cancel the rendering of anything rendered after that. By default, it returnsfalse.- Specified by:
cancelOverlayRenderingin interfaceZoomOverlay- Returns:
- the state that will be used in order to cancel the rendering or not
-
renderOverlay
public void renderOverlay(net.minecraft.client.util.math.MatrixStack matrices) Description copied from interface:ZoomOverlayRenders the overlay itself. It's injected by LibZoomer itself.- Specified by:
renderOverlayin interfaceZoomOverlay- Parameters:
matrices- the in-game HUD's matrices
-
tick
public void tick(boolean active, double divisor, double transitionMultiplier) Description copied from interface:ZoomOverlayThe tick method. Used in order to keep the internal variables accurate and the overlay functional.- Specified by:
tickin interfaceZoomOverlay- Parameters:
active- the zoom statedivisor- the zoom divisortransitionMultiplier- the transition mode's internal multiplier
-
tickBeforeRender
public void tickBeforeRender()Description copied from interface:ZoomOverlayThe tick method used right before the overlay is rendered.This isn't required to be implemented.
- Specified by:
tickBeforeRenderin interfaceZoomOverlay
-