java.lang.Object
foundry.veil.api.client.render.light.data.LightData
Direct Known Subclasses:
AreaLightData, DirectionalLightData, PointLightData

public abstract class LightData extends Object
A source of luminance in a scene. Drawn using LightRenderer.
Since:
2.0.0
  • Field Details

    • color

      protected final Color color
    • brightness

      protected float brightness
  • Constructor Details

    • LightData

      public LightData()
  • Method Details

    • getColor

      public Color getColor()
      Returns:
      The color of this light
    • getBrightness

      public float getBrightness()
      Returns:
      The brightness multiplier of the light.
    • setColor

      public LightData setColor(org.joml.Vector3fc color)
      Sets the RGB color of this light.
      Parameters:
      color - The new color values
    • setColor

      public LightData setColor(Colorc color)
      Sets the RGB color of this light.
      Parameters:
      color - The new color values
    • setColor

      public LightData setColor(float red, float green, float blue)
      Sets the RGB color of this light.
      Parameters:
      red - The new red
      green - The new green
      blue - The new blue
    • setColor

      public LightData setColor(int color)
      Sets the RGB color of this light.
      Parameters:
      color - THe new RGB of this light
    • setBrightness

      public LightData setBrightness(float brightness)
      Sets the brightness of the light. This acts as a multiplier on the light's color.
      Parameters:
      brightness - The new brightness of the light.
    • isVisible

      public abstract boolean isVisible(CullFrustum frustum)
      Checks if this light is visible to the camera.
      Parameters:
      frustum - The frustum to check against
      Returns:
      Whether this light is visible
    • setTo

      public LightData setTo(net.minecraft.client.Camera camera)
      Sets the light position/rotation to be the same as the specified camera.
      Parameters:
      camera - The camera to set relative to
    • getType

      public abstract LightTypeRegistry.LightType<?> getType()
      Returns:
      The type of light this is