Record Class LocationWrapper
java.lang.Object
java.lang.Record
kr.toxicity.hud.api.adapter.LocationWrapper
- Record Components:
world- worldx- x coordinatey- y coordinatez- z coordinatepitch- player's pitchyaw- player's yaw
public record LocationWrapper(@NotNull WorldWrapper world, double x, double y, double z, float pitch, float yaw)
extends Record
A wrapper class of location.
-
Constructor Summary
ConstructorsConstructorDescriptionLocationWrapper(@NotNull WorldWrapper world, double x, double y, double z, float pitch, float yaw) Creates an instance of aLocationWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull LocationWrapperdeserialize(@NotNull com.google.gson.JsonObject data) Finds location from JSON.static @NotNull LocationWrapperdeserialize(@NotNull YamlObject data) Finds location from YAML.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatpitch()Returns the value of thepitchrecord component.Serializes to map.final StringtoString()Returns a string representation of this record class.@NotNull WorldWrapperworld()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
-
LocationWrapper
public LocationWrapper(@NotNull @NotNull WorldWrapper world, double x, double y, double z, float pitch, float yaw) Creates an instance of aLocationWrapperrecord class.
-
-
Method Details
-
deserialize
Finds location from YAML.- Parameters:
data- raw data- Returns:
- location
-
deserialize
@NotNull public static @NotNull LocationWrapper deserialize(@NotNull @NotNull com.google.gson.JsonObject data) Finds location from JSON.- Parameters:
data- raw data- Returns:
- location
-
serialize
-
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. -
world
-
x
-
y
-
z
-
pitch
-
yaw
-