Record Class AdultAndBabyModelPair<T extends Model>

java.lang.Object
java.lang.Record
net.minecraft.client.model.AdultAndBabyModelPair<T>

public record AdultAndBabyModelPair<T extends Model>(T extends Model adultModel, T extends Model babyModel) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final T
    The field for the adultModel record component.
    private final T
    The field for the babyModel record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AdultAndBabyModelPair(T adultModel, T babyModel)
    Creates an instance of a AdultAndBabyModelPair record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the adultModel record component.
    Returns the value of the babyModel record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    getModel(boolean p_393881_)
     
    final int
    Returns a hash code value for this object.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • adultModel

      private final T extends Model adultModel
      The field for the adultModel record component.
    • babyModel

      private final T extends Model babyModel
      The field for the babyModel record component.
  • Constructor Details

    • AdultAndBabyModelPair

      public AdultAndBabyModelPair(T adultModel, T babyModel)
      Creates an instance of a AdultAndBabyModelPair record class.
      Parameters:
      adultModel - the value for the adultModel record component
      babyModel - the value for the babyModel record component
  • Method Details

    • getModel

      public T getModel(boolean p_393881_)
    • 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.
    • adultModel

      public T adultModel()
      Returns the value of the adultModel record component.
      Returns:
      the value of the adultModel record component
    • babyModel

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