Package io.github.ennuil.libzoomer.api
Class ZoomRegistry
java.lang.Object
io.github.ennuil.libzoomer.api.ZoomRegistry
The class responsible for the handling the zoom instance registry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Set<ZoomInstance> Gets a set of all registered zoom instances.protected static ZoomInstanceregisterInstance(ZoomInstance instance) Registers a zoom instance into the internal set of zoom instances.static voidsetIterateModifiers(boolean iterateModifiers) Sets the state that determines the need for an iteration through all zoom instances with active modifiers.static voidsetIterateOverlays(boolean iterateOverlays) Sets the state that determines the need for an iteration through all zoom instances with active overlays.static voidsetIterateTransitions(boolean iterateTransitions) Sets the state that determines the need for an iteration through all zoom instances with active transitions.static voidsetIterateZoom(boolean iterateZoom) Sets the state that determines the need for an iteration through all active zoom instances.static booleanDetermines whenever an iteration through all zoom instances with active modifiers is necessary.static booleanDetermines whenever an iteration through all zoom instances with active overlays is necessary.static booleanDetermines whenever an iteration through all zoom instances with active transitions is necessary.static booleanDetermines whenever an iteration through all active zoom instances is necessary.
-
Constructor Details
-
ZoomRegistry
public ZoomRegistry()
-
-
Method Details
-
registerInstance
Registers a zoom instance into the internal set of zoom instances. Mandatory in order to make a zoom instance functional.- Parameters:
instance- an unregistered zoom instance- Returns:
- the zoom instance if registered, or
nullotherwise
-
getZoomInstances
Gets a set of all registered zoom instances.- Returns:
- a set of all registered zoom instances
-
shouldIterateZoom
public static boolean shouldIterateZoom()Determines whenever an iteration through all active zoom instances is necessary.- Returns:
trueif an iteration is needed, orfalseotherwise
-
setIterateZoom
@Internal public static void setIterateZoom(boolean iterateZoom) Sets the state that determines the need for an iteration through all active zoom instances. This is an internal method that shouldn't be used by other mods.- Parameters:
iterateZoom- The new iteration state.
-
shouldIterateTransitions
public static boolean shouldIterateTransitions()Determines whenever an iteration through all zoom instances with active transitions is necessary.- Returns:
trueif an iteration is needed, orfalseotherwise
-
setIterateTransitions
@Internal public static void setIterateTransitions(boolean iterateTransitions) Sets the state that determines the need for an iteration through all zoom instances with active transitions.This is an internal method and shouldn't be used by other mods.
- Parameters:
iterateTransitions- the new iteration state
-
shouldIterateModifiers
public static boolean shouldIterateModifiers()Determines whenever an iteration through all zoom instances with active modifiers is necessary.- Returns:
trueif an iteration is needed, orfalseotherwise
-
setIterateModifiers
@Internal public static void setIterateModifiers(boolean iterateModifiers) Sets the state that determines the need for an iteration through all zoom instances with active modifiers.This is an internal method that shouldn't be used by other mods.
- Parameters:
iterateModifiers- the new iteration state
-
shouldIterateOverlays
public static boolean shouldIterateOverlays()Determines whenever an iteration through all zoom instances with active overlays is necessary.- Returns:
trueif an iteration is needed, orfalseotherwise
-
setIterateOverlays
@Internal public static void setIterateOverlays(boolean iterateOverlays) Sets the state that determines the need for an iteration through all zoom instances with active overlays.This is an internal method that shouldn't be used by other mods.
- Parameters:
iterateOverlays- the new iteration state
-