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 Details

    • nearDistance

      private final int nearDistance
      The field for the nearDistance record component.
    • farDistance

      private final int farDistance
      The field for the farDistance record component.
    • sprites

      private final List<ResourceLocation> sprites
      The field for the sprites record component.
    • spriteLocations

      private final List<ResourceLocation> spriteLocations
      The field for the spriteLocations 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

      private static final com.mojang.serialization.Codec<Integer> DISTANCE_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<WaypointStyle> CODEC
  • Constructor Details

    • WaypointStyle

      public WaypointStyle(int p_419759_, int p_419537_, List<ResourceLocation> p_420059_)
    • WaypointStyle

      public WaypointStyle(int nearDistance, int farDistance, List<ResourceLocation> sprites, List<ResourceLocation> spriteLocations)
      Creates an instance of a WaypointStyle record class.
      Parameters:
      nearDistance - the value for the nearDistance record component
      farDistance - the value for the farDistance record component
      sprites - the value for the sprites record component
      spriteLocations - the value for the spriteLocations record component
  • Method Details

    • validate

      private com.mojang.serialization.DataResult<WaypointStyle> validate()
    • sprite

      public ResourceLocation sprite(float pDistance)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • nearDistance

      public int nearDistance()
      Returns the value of the nearDistance record component.
      Returns:
      the value of the nearDistance record component
    • farDistance

      public int farDistance()
      Returns the value of the farDistance record component.
      Returns:
      the value of the farDistance record component
    • sprites

      public List<ResourceLocation> sprites()
      Returns the value of the sprites record component.
      Returns:
      the value of the sprites record component
    • spriteLocations

      public List<ResourceLocation> spriteLocations()
      Returns the value of the spriteLocations record component.
      Returns:
      the value of the spriteLocations record component