Record Class CaptureRequest

java.lang.Object
java.lang.Record
ke.ric.renderer.api.CaptureRequest
Record Components:
camera - camera position and world; defensively cloned
radius - finite positive capture radius in blocks
settings - output dimensions and rendering intent
chunksPerTick - maximum chunks whose state may be read in one server tick
excludedEntityIds - entity UUIDs omitted before visual capture; defensively copied

public record CaptureRequest(org.bukkit.Location camera, double radius, RenderSettings settings, int chunksPerTick, Set<UUID> excludedEntityIds) extends Record
Describes an asynchronous Paper-world capture centered on a camera location.
  • Constructor Details

    • CaptureRequest

      public CaptureRequest(org.bukkit.Location camera, double radius, RenderSettings settings, int chunksPerTick, Set<UUID> excludedEntityIds)
      Creates an instance of a CaptureRequest record class.
      Parameters:
      camera - the value for the camera record component
      radius - the value for the radius record component
      settings - the value for the settings record component
      chunksPerTick - the value for the chunksPerTick record component
      excludedEntityIds - the value for the excludedEntityIds record component
    • CaptureRequest

      public CaptureRequest(org.bukkit.Location camera, double radius, RenderSettings settings, int chunksPerTick)
      Captures all renderable entities, preserving the original request default.
  • Method Details

    • camera

      public org.bukkit.Location camera()
      Returns a fresh copy of the camera location; changing it cannot alter this request.
    • at

      public static CaptureRequest at(org.bukkit.Location camera)
      Starts a capture with RenderSettings.defaults(): Classic at 128 by 128 pixels. Uses a 16-block radius, at most two chunks per server tick and no exclusions. Construction copies the location; it does not read or load the world.
      Parameters:
      camera - camera position/orientation, with the world to capture
      Returns:
      immutable request; required chunks must already be loaded when captured
    • at

      public static CaptureRequest at(org.bukkit.Location camera, RenderSettings settings)
      Starts a request with radius 16 blocks, at most two chunks per server tick and no exclusions. Construction copies the location; it does not read or load the world.
      Parameters:
      camera - camera position/orientation, with the world to capture
      settings - render dimensions, quality and resource limits
      Returns:
      immutable request; required chunks must already be loaded when captured
    • withRadius

      public CaptureRequest withRadius(double radiusBlocks)
      Returns an immutable copy with a finite positive capture radius. Provider limits still apply.
      Parameters:
      radiusBlocks - finite positive capture radius in world blocks
      Returns:
      copied request with the new radius
    • withChunksPerTick

      public CaptureRequest withChunksPerTick(int chunksPerTick)
      Returns a copy limiting world reads per server tick.
      Parameters:
      chunksPerTick - positive maximum chunks to read in one tick, subject to provider limits
      Returns:
      copied request with the new per-tick budget
    • excluding

      public CaptureRequest excluding(Set<UUID> excludedEntityIds)
      Returns a copy replacing the exclusion set before entity visual capture.
      Parameters:
      excludedEntityIds - non-null UUID set; copied, and must not contain null
      Returns:
      copied request excluding exactly these UUIDs
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • radius

      public double radius()
      Returns the value of the radius record component.
      Returns:
      the value of the radius record component
    • settings

      public RenderSettings settings()
      Returns the value of the settings record component.
      Returns:
      the value of the settings record component
    • chunksPerTick

      public int chunksPerTick()
      Returns the value of the chunksPerTick record component.
      Returns:
      the value of the chunksPerTick record component
    • excludedEntityIds

      public Set<UUID> excludedEntityIds()
      Returns the value of the excludedEntityIds record component.
      Returns:
      the value of the excludedEntityIds record component