Record Class PaintRecord
java.lang.Object
java.lang.Record
dev.despical.pixelpainter.storage.PaintRecord
- Record Components:
id- twelve-character hexadecimal journal identifierowner- creating player UUIDworld- target world UUIDimage- source image namecreated- creation timestamp in epoch millisecondsbounds- inclusive reserved regionchanges- original and target block states
public record PaintRecord(String id, UUID owner, UUID world, String image, long created, Bounds bounds, List<PaintRecord.Change> changes)
extends Record
Represents a durable undo journal written before its painting changes terrain.
Owner and world UUIDs identify access and the target world. Inclusive bounds reserve its area against overlapping paintings. The copied change list records both original and intended block properties.
A record can describe interrupted or partial work. Recovery checks live block data rather than assuming every change was applied. Block-entity NBT is not stored because creation refuses to overwrite those blocks.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRecords one original and intended block state at a world-relative coordinate. -
Constructor Summary
ConstructorsConstructorDescriptionPaintRecord(String id, UUID owner, UUID world, String image, long created, Bounds bounds, List<PaintRecord.Change> changes) Copies the change list to isolate the journal payload from caller mutations. -
Method Summary
Modifier and TypeMethodDescriptionbounds()Returns the value of theboundsrecord component.changes()Returns the value of thechangesrecord component.longcreated()Returns the value of thecreatedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.image()Returns the value of theimagerecord component.owner()Returns the value of theownerrecord component.final StringtoString()Returns a string representation of this record class.world()Returns the value of theworldrecord component.
-
Constructor Details
-
PaintRecord
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
id
-
owner
-
world
-
image
-
created
-
bounds
-
changes
-