Package net.minecraft.client.resources
Record Class WaypointStyle
java.lang.Object
java.lang.Record
net.minecraft.client.resources.WaypointStyle
public record WaypointStyle(int nearDistance, int farDistance, List<ResourceLocation> sprites, List<ResourceLocation> spriteLocations)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<WaypointStyle> static final int
static final int
private static final com.mojang.serialization.Codec
<Integer> private final int
The field for thefarDistance
record component.private final int
The field for thenearDistance
record component.private final List
<ResourceLocation> The field for thespriteLocations
record component.private final List
<ResourceLocation> The field for thesprites
record component. -
Constructor Summary
ConstructorsConstructorDescriptionWaypointStyle
(int p_419759_, int p_419537_, List<ResourceLocation> p_420059_) WaypointStyle
(int nearDistance, int farDistance, List<ResourceLocation> sprites, List<ResourceLocation> spriteLocations) Creates an instance of aWaypointStyle
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.int
Returns the value of thefarDistance
record component.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of thenearDistance
record component.sprite
(float pDistance) Returns the value of thespriteLocations
record component.sprites()
Returns the value of thesprites
record component.final String
toString()
Returns a string representation of this record class.private com.mojang.serialization.DataResult
<WaypointStyle> validate()
-
Field Details
-
nearDistance
private final int nearDistanceThe field for thenearDistance
record component. -
farDistance
private final int farDistanceThe field for thefarDistance
record component. -
sprites
The field for thesprites
record component. -
spriteLocations
The field for thespriteLocations
record component. -
DEFAULT_NEAR_DISTANCE
public static final int DEFAULT_NEAR_DISTANCE- See Also:
-
DEFAULT_FAR_DISTANCE
public static final int DEFAULT_FAR_DISTANCE- See Also:
-
DISTANCE_CODEC
-
CODEC
-
-
Constructor Details
-
WaypointStyle
-
WaypointStyle
public WaypointStyle(int nearDistance, int farDistance, List<ResourceLocation> sprites, List<ResourceLocation> spriteLocations) Creates an instance of aWaypointStyle
record class.- Parameters:
nearDistance
- the value for thenearDistance
record componentfarDistance
- the value for thefarDistance
record componentsprites
- the value for thesprites
record componentspriteLocations
- the value for thespriteLocations
record component
-
-
Method Details
-
validate
-
sprite
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
nearDistance
public int nearDistance()Returns the value of thenearDistance
record component.- Returns:
- the value of the
nearDistance
record component
-
farDistance
public int farDistance()Returns the value of thefarDistance
record component.- Returns:
- the value of the
farDistance
record component
-
sprites
Returns the value of thesprites
record component.- Returns:
- the value of the
sprites
record component
-
spriteLocations
Returns the value of thespriteLocations
record component.- Returns:
- the value of the
spriteLocations
record component
-