Contents
Record Class VoiceModule.PositionSnapshot
java.lang.Object
java.lang.Record
com.hypixel.hytale.server.core.modules.voice.VoiceModule.PositionSnapshot
- Enclosing class:
VoiceModule
public static record VoiceModule.PositionSnapshot(@Nonnull org.joml.Vector3dc position, boolean isUnderwater, @Nonnull UUID worldId, int networkId, boolean isDead)
extends Record
Immutable position snapshot for thread-safe spatial queries from the voice executor.
Includes underwater state for voice audio effects, world ID for cross-world isolation,
and dead flag for voice isolation (cached here to avoid WorldThread-only ECS access).
-
Constructor Summary
ConstructorsConstructorDescriptionPositionSnapshot(org.joml.Vector3dc position, boolean isUnderwater, UUID worldId, int networkId, boolean isDead) Creates an instance of aPositionSnapshotrecord 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.booleanisDead()Returns the value of theisDeadrecord component.booleanReturns the value of theisUnderwaterrecord component.intReturns the value of thenetworkIdrecord component.org.joml.Vector3dcposition()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.worldId()Returns the value of theworldIdrecord component.
-
Constructor Details
-
PositionSnapshot
public PositionSnapshot(@Nonnull org.joml.Vector3dc position, boolean isUnderwater, @Nonnull UUID worldId, int networkId, boolean isDead) Creates an instance of aPositionSnapshotrecord class.- Parameters:
position- the value for thepositionrecord componentisUnderwater- the value for theisUnderwaterrecord componentworldId- the value for theworldIdrecord componentnetworkId- the value for thenetworkIdrecord componentisDead- the value for theisDeadrecord component
-
-
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. -
position
@Nonnull public org.joml.Vector3dc position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
isUnderwater
public boolean isUnderwater()Returns the value of theisUnderwaterrecord component.- Returns:
- the value of the
isUnderwaterrecord component
-
worldId
Returns the value of theworldIdrecord component.- Returns:
- the value of the
worldIdrecord component
-
networkId
public int networkId()Returns the value of thenetworkIdrecord component.- Returns:
- the value of the
networkIdrecord component
-
isDead
public boolean isDead()Returns the value of theisDeadrecord component.- Returns:
- the value of the
isDeadrecord component
-