Contents
Record Class SpatialSnapshot
java.lang.Object
java.lang.Record
com.hypixel.hytale.builtin.triggervolumes.manager.SpatialSnapshot
public record SpatialSnapshot(@Nonnull org.joml.Vector3d position, @Nonnull TriggerVolumeShape shape)
extends Record
Pre-edit position and shape of a
VolumeEntry, captured the instant before a spatial
mutation. The spatial index recomputes the volume's old footprint from a snapshot so it can
unstamp the cells the volume used to occupy without persisting per-entry bounds across ticks.
The shape is a defensive copy taken at snapshot time; callers must never hand in a
live shape reference that could change before the snapshot is consumed.
-
Constructor Summary
ConstructorsConstructorDescriptionSpatialSnapshot(org.joml.Vector3d position, TriggerVolumeShape shape) Creates an instance of aSpatialSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static SpatialSnapshotof(VolumeEntry entry) org.joml.Vector3dposition()Returns the value of thepositionrecord component.shape()Returns the value of theshaperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SpatialSnapshot
Creates an instance of aSpatialSnapshotrecord class.- Parameters:
position- the value for thepositionrecord componentshape- the value for theshaperecord component
-
-
Method Details
-
of
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
position
@Nonnull public org.joml.Vector3d position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
shape
Returns the value of theshaperecord component.- Returns:
- the value of the
shaperecord component
-