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 intstatic final intprivate static final com.mojang.serialization.Codec<Integer> private final intThe field for thefarDistancerecord component.static final Stringprivate final intThe field for thenearDistancerecord component.private final List<ResourceLocation> The field for thespriteLocationsrecord component.private final List<ResourceLocation> The field for thespritesrecord 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 aWaypointStylerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefarDistancerecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thenearDistancerecord component.sprite(float pDistance) Returns the value of thespriteLocationsrecord component.sprites()Returns the value of thespritesrecord component.final StringtoString()Returns a string representation of this record class.com.mojang.serialization.DataResult<WaypointStyle> validate()
-
Field Details
-
nearDistance
private final int nearDistanceThe field for thenearDistancerecord component. -
farDistance
private final int farDistanceThe field for thefarDistancerecord component. -
sprites
The field for thespritesrecord component. -
spriteLocations
The field for thespriteLocationsrecord component. -
ICON_LOCATION_PREFIX
- See Also:
-
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 aWaypointStylerecord class.- Parameters:
nearDistance- the value for thenearDistancerecord componentfarDistance- the value for thefarDistancerecord componentsprites- the value for thespritesrecord componentspriteLocations- the value for thespriteLocationsrecord 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 thenearDistancerecord component.- Returns:
- the value of the
nearDistancerecord component
-
farDistance
public int farDistance()Returns the value of thefarDistancerecord component.- Returns:
- the value of the
farDistancerecord component
-
sprites
Returns the value of thespritesrecord component.- Returns:
- the value of the
spritesrecord component
-
spriteLocations
Returns the value of thespriteLocationsrecord component.- Returns:
- the value of the
spriteLocationsrecord component
-