Class RenderEnvironment

java.lang.Object
ke.ric.renderer.api.RenderEnvironment

public final class RenderEnvironment extends Object
Immutable rendered-environment overrides. These do not modify the live Bukkit world, captured biome or CaptureProvenance. Every modifier returns a new value. Unspecified fields inherit the captured scene; in a recipe layer, they first inherit request-level overrides. Rendered time also drives sunlight direction unless lighting explicitly overrides that direction.
  • Method Details

    • captured

      public static RenderEnvironment captured()
      Inherits captured or manually supplied environment facts. In a layer, unspecified fields inherit the request's environment overrides first.
      Returns:
      a value with no explicit overrides
    • timeOfDay

      public RenderEnvironment timeOfDay(int ticks)
      Overrides rendered time of day while preserving the source day and moon phase. It changes rendered lighting/time effects without changing the server clock or captured provenance.
      Parameters:
      ticks - day ticks in 0..23999; for example, 6000 is midday
      Returns:
      a new environment value
      Throws:
      IllegalArgumentException - if ticks is outside 0..23999
    • weather

      public RenderEnvironment weather(Weather value)
      Overrides rendered precipitation independently of the live world. This does not edit biomes or the captured thunder fact.
      Parameters:
      value - CLEAR, RAIN or SNOW
      Returns:
      a new environment value
      Throws:
      NullPointerException - if value is null
    • timeOfDay

      public OptionalInt timeOfDay()
      Returns the requested rendered day tick override.
      Returns:
      ticks in 0..23999, or empty when inherited
    • weather

      public Optional<Weather> weather()
      Returns the requested rendered precipitation override.
      Returns:
      explicit weather, or empty when inherited
    • isCaptured

      public boolean isCaptured()
      Reports whether every field inherits source environment evidence.
      Returns:
      true when both time and weather are unspecified