Record Class ArmorModelSet<T>

java.lang.Object
java.lang.Record
net.minecraft.client.renderer.entity.ArmorModelSet<T>

public record ArmorModelSet<T>(T head, T chest, T legs, T feet) extends Record
  • Field Details

    • chest

      private final T chest
      The field for the chest record component.
    • legs

      private final T legs
      The field for the legs record component.
    • feet

      private final T feet
      The field for the feet record component.
  • Constructor Details

    • ArmorModelSet

      public ArmorModelSet(T head, T chest, T legs, T feet)
      Creates an instance of a ArmorModelSet record class.
      Parameters:
      head - the value for the head record component
      chest - the value for the chest record component
      legs - the value for the legs record component
      feet - the value for the feet record component
  • Method Details

    • get

      public T get(EquipmentSlot slot)
    • map

      public <U> ArmorModelSet<U> map(Function<? super T, ? extends U> mapper)
    • putFrom

      public void putFrom(ArmorModelSet<LayerDefinition> values, ImmutableMap.Builder<T, LayerDefinition> output)
    • bake

      public static <M extends HumanoidModel<?>> ArmorModelSet<M> bake(ArmorModelSet<ModelLayerLocation> locations, EntityModelSet modelSet, Function<ModelPart, M> factory)
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • head

      public T head()
      Returns the value of the head record component.
      Returns:
      the value of the head record component
    • chest

      public T chest()
      Returns the value of the chest record component.
      Returns:
      the value of the chest record component
    • legs

      public T legs()
      Returns the value of the legs record component.
      Returns:
      the value of the legs record component
    • feet

      public T feet()
      Returns the value of the feet record component.
      Returns:
      the value of the feet record component