Package com.mrbysco.lunar.client
Class MoonHandler
java.lang.Object
com.mrbysco.lunar.client.MoonHandler
Handles the moon color, texture and scale.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCalled to set the color of the moon.static voidClear the moon values.static intGet the color of the moon.static org.joml.Matrix4fGet the scale of the moon.static net.minecraft.resources.ResourceLocationgetMoonTexture(net.minecraft.resources.ResourceLocation defaultTexture) Get the ID of the moon.static floatGet the color of the moon as a float array.static booleanCheck if the event is active.static booleanCheck if the moon is scaled.static org.joml.Matrix4fscaleMoon(org.joml.Matrix4f matrix) Scale the moon.static voidCalled to set the local values of the moon.static voidsetMoonTexture(@Nullable net.minecraft.resources.ResourceLocation location) Called to set the texture used for the moon.
-
Constructor Details
-
MoonHandler
public MoonHandler()
-
-
Method Details
-
colorTheMoon
public static void colorTheMoon()Called to set the color of the moon. -
setMoon
Called to set the local values of the moon.- Parameters:
eventID- The event IDcolor- The color of the moonscale- The scale of the moon
-
setMoonTexture
public static void setMoonTexture(@Nullable @Nullable net.minecraft.resources.ResourceLocation location) Called to set the texture used for the moon.- Parameters:
location- The resource location of the texture
-
disableMoon
public static void disableMoon()Clear the moon values. -
isEventActive
public static boolean isEventActive()Check if the event is active.- Returns:
- true if the event is active, false otherwise
-
isMoonScaled
public static boolean isMoonScaled()Check if the moon is scaled.- Returns:
- true if the moon is scaled, false otherwise
-
getMoonTexture
public static net.minecraft.resources.ResourceLocation getMoonTexture(net.minecraft.resources.ResourceLocation defaultTexture) Get the ID of the moon.- Parameters:
defaultTexture- The default texture- Returns:
- the resource location of the moon texture
-
getMoonScale
public static org.joml.Matrix4f getMoonScale()Get the scale of the moon.- Returns:
- the scale of the moon
-
scaleMoon
public static org.joml.Matrix4f scaleMoon(org.joml.Matrix4f matrix) Scale the moon.- Parameters:
matrix- the matrix to scale- Returns:
- the scaled matrix
-
getMoonColor
public static int getMoonColor()Get the color of the moon.- Returns:
- the color int of the moon
-
getRawMoonScale
public static float getRawMoonScale()Get the color of the moon as a float array.- Returns:
- the color of the moon as a float array
-