Package ke.ric.renderer.api
Record Class CaptureRequest
java.lang.Object
java.lang.Record
ke.ric.renderer.api.CaptureRequest
- Record Components:
camera- camera position and world; defensively clonedradius- finite positive capture radius in blockssettings- output dimensions and rendering intentchunksPerTick- maximum chunks whose state may be read in one server tickexcludedEntityIds- 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 Summary
ConstructorsConstructorDescriptionCaptureRequest(org.bukkit.Location camera, double radius, RenderSettings settings, int chunksPerTick) Captures all renderable entities, preserving the original request default.CaptureRequest(org.bukkit.Location camera, double radius, RenderSettings settings, int chunksPerTick, Set<UUID> excludedEntityIds) Creates an instance of aCaptureRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CaptureRequestat(org.bukkit.Location camera) Starts a capture withRenderSettings.defaults(): Classic at 128 by 128 pixels.static CaptureRequestat(org.bukkit.Location camera, RenderSettings settings) Starts a request with radius 16 blocks, at most two chunks per server tick and no exclusions.org.bukkit.Locationcamera()Returns a fresh copy of the camera location; changing it cannot alter this request.intReturns the value of thechunksPerTickrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexcludedEntityIdsrecord component.Returns a copy replacing the exclusion set before entity visual capture.final inthashCode()Returns a hash code value for this object.doubleradius()Returns the value of theradiusrecord component.settings()Returns the value of thesettingsrecord component.final StringtoString()Returns a string representation of this record class.withChunksPerTick(int chunksPerTick) Returns a copy limiting world reads per server tick.withRadius(double radiusBlocks) Returns an immutable copy with a finite positive capture radius.
-
Constructor Details
-
CaptureRequest
public CaptureRequest(org.bukkit.Location camera, double radius, RenderSettings settings, int chunksPerTick, Set<UUID> excludedEntityIds) Creates an instance of aCaptureRequestrecord class.- Parameters:
camera- the value for thecamerarecord componentradius- the value for theradiusrecord componentsettings- the value for thesettingsrecord componentchunksPerTick- the value for thechunksPerTickrecord componentexcludedEntityIds- the value for theexcludedEntityIdsrecord 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
Starts a capture withRenderSettings.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
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 capturesettings- render dimensions, quality and resource limits- Returns:
- immutable request; required chunks must already be loaded when captured
-
withRadius
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
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
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
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
radius
public double radius()Returns the value of theradiusrecord component.- Returns:
- the value of the
radiusrecord component
-
settings
Returns the value of thesettingsrecord component.- Returns:
- the value of the
settingsrecord component
-
chunksPerTick
public int chunksPerTick()Returns the value of thechunksPerTickrecord component.- Returns:
- the value of the
chunksPerTickrecord component
-
excludedEntityIds
Returns the value of theexcludedEntityIdsrecord component.- Returns:
- the value of the
excludedEntityIdsrecord component
-