Record Class GhostState
java.lang.Object
java.lang.Record
com.iantapply.conflux.api.GhostState
- Record Components:
playerId- unique identifier of the remote playerusername- current Minecraft username of the remote playerworld- name of the world containing the remote playerx- world x-coordinatey- world y-coordinatez- world z-coordinateyaw- horizontal rotation in degreespitch- vertical rotation in degreesonGround- whether the player is touching the groundsneaking- whether the player is sneakingsprinting- whether the player is sprintingswimming- whether the player is swimminggliding- whether the player is gliding with an elytraskinValue- signed profile texture value, or an empty stringskinSignature- profile texture signature, or an empty stringequipment- equipment worn or held by the player
public record GhostState(UUID playerId, String username, String world, double x, double y, double z, float yaw, float pitch, boolean onGround, boolean sneaking, boolean sprinting, boolean swimming, boolean gliding, String skinValue, String skinSignature, GhostEquipment equipment)
extends Record
One remote player's visual state at a point in time.
-
Constructor Summary
ConstructorsConstructorDescriptionGhostState(UUID playerId, String username, String world, double x, double y, double z, float yaw, float pitch, boolean onGround, boolean sneaking, boolean sprinting, boolean swimming, boolean gliding, String skinValue, String skinSignature, GhostEquipment equipment) Validates and creates a player ghost state. -
Method Summary
Modifier and TypeMethodDescriptionReturns the infrequently changing portion of this full snapshot.static GhostStatecombine(GhostMovement movement, GhostAppearance appearance) Combines movement and appearance state into a renderable full snapshot.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theequipmentrecord component.booleangliding()Returns the value of theglidingrecord component.final inthashCode()Returns a hash code value for this object.movement()Returns the frequently changing portion of this full snapshot.booleanonGround()Returns the value of theonGroundrecord component.floatpitch()Returns the value of thepitchrecord component.playerId()Returns the value of theplayerIdrecord component.Returns the value of theskinSignaturerecord component.Returns the value of theskinValuerecord component.booleansneaking()Returns the value of thesneakingrecord component.booleanReturns the value of thesprintingrecord component.booleanswimming()Returns the value of theswimmingrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.world()Returns the value of theworldrecord component.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.floatyaw()Returns the value of theyawrecord component.doublez()Returns the value of thezrecord component.
-
Constructor Details
-
GhostState
public GhostState(UUID playerId, String username, String world, double x, double y, double z, float yaw, float pitch, boolean onGround, boolean sneaking, boolean sprinting, boolean swimming, boolean gliding, String skinValue, String skinSignature, GhostEquipment equipment) Validates and creates a player ghost state.
-
-
Method Details
-
movement
Returns the frequently changing portion of this full snapshot.- Returns:
- movement portion
-
appearance
Returns the infrequently changing portion of this full snapshot.- Returns:
- appearance portion
-
combine
Combines movement and appearance state into a renderable full snapshot.- Parameters:
movement- movement portionappearance- appearance portion for the same player- Returns:
- combined renderable snapshot
-
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. -
playerId
-
username
-
world
-
x
-
y
-
z
-
yaw
-
pitch
-
onGround
-
sneaking
-
sprinting
-
swimming
-
gliding
-
skinValue
-
skinSignature
Returns the value of theskinSignaturerecord component.- Returns:
- the value of the
skinSignaturerecord component
-
equipment
-