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 org.joml.Vector4fcolorTheMoon(org.joml.Vector4f originalColor) Called to set the color of the moon.static voidClear the moon values.static com.mojang.renderpearl.api.buffers.GpuBuffergetMoonBuffer(com.mojang.renderpearl.api.buffers.GpuBuffer defaultBuffer) Get the ID of the moon.static intGet the color of the moon.static org.joml.Matrix4fGet the scale 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 voidsetMoonBuffer(@Nullable net.minecraft.resources.Identifier textureLocation) Called to set the texture used for the moon.
-
Constructor Details
-
MoonHandler
public MoonHandler()
-
-
Method Details
-
colorTheMoon
public static org.joml.Vector4f colorTheMoon(org.joml.Vector4f originalColor) 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
-
setMoonBuffer
public static void setMoonBuffer(@Nullable @Nullable net.minecraft.resources.Identifier textureLocation) Called to set the texture used for the moon.- Parameters:
textureLocation- The AbstractTexture 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
-
getMoonBuffer
public static com.mojang.renderpearl.api.buffers.GpuBuffer getMoonBuffer(com.mojang.renderpearl.api.buffers.GpuBuffer defaultBuffer) Get the ID of the moon.- Parameters:
defaultBuffer- The default gpu buffer- 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
-