Record Class ModelIdentifier

java.lang.Object
java.lang.Record
net.minecraft.client.util.ModelIdentifier
Record Components:
id -
variant -

@Environment(CLIENT) public record ModelIdentifier(Identifier id, String variant) extends Record
Mappings:
Namespace Name
named net/minecraft/client/util/ModelIdentifier
intermediary net/minecraft/class_1091
official gsu
named id
intermediary comp_2875
official b
named variant
intermediary comp_2876
official c
  • Field Details

    • id

      private final Identifier id
      The field for the id record component.
    • variant

      private final String variant
      The field for the variant record component.
    • INVENTORY_VARIANT

      public static final String INVENTORY_VARIANT
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named INVENTORY_VARIANT Lnet/minecraft/client/util/ModelIdentifier;INVENTORY_VARIANT:Ljava/lang/String;
      intermediary field_52277 Lnet/minecraft/class_1091;field_52277:Ljava/lang/String;
      official a Lgsu;a:Ljava/lang/String;
  • Constructor Details

    • ModelIdentifier

      public ModelIdentifier(Identifier id, String variant)
      Creates an instance of a ModelIdentifier record class.
      Parameters:
      id - the value for the id record component
      variant - the value for the variant record component
  • Method Details

    • ofVanilla

      public static ModelIdentifier ofVanilla(String path, String variant)
      Mappings:
      Namespace Name Mixin selector
      named ofVanilla Lnet/minecraft/client/util/ModelIdentifier;ofVanilla(Ljava/lang/String;Ljava/lang/String;)Lnet/minecraft/client/util/ModelIdentifier;
      intermediary method_45910 Lnet/minecraft/class_1091;method_45910(Ljava/lang/String;Ljava/lang/String;)Lnet/minecraft/class_1091;
      official a Lgsu;a(Ljava/lang/String;Ljava/lang/String;)Lgsu;
    • ofInventoryVariant

      public static ModelIdentifier ofInventoryVariant(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      named ofInventoryVariant Lnet/minecraft/client/util/ModelIdentifier;ofInventoryVariant(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/util/ModelIdentifier;
      intermediary method_61078 Lnet/minecraft/class_1091;method_61078(Lnet/minecraft/class_2960;)Lnet/minecraft/class_1091;
      official a Lgsu;a(Lakr;)Lgsu;
    • toLowerCase

      private static String toLowerCase(String string)
      Mappings:
      Namespace Name Mixin selector
      named toLowerCase Lnet/minecraft/client/util/ModelIdentifier;toLowerCase(Ljava/lang/String;)Ljava/lang/String;
      intermediary method_45911 Lnet/minecraft/class_1091;method_45911(Ljava/lang/String;)Ljava/lang/String;
      official a Lgsu;a(Ljava/lang/String;)Ljava/lang/String;
    • getVariant

      public String getVariant()
      Mappings:
      Namespace Name Mixin selector
      named getVariant Lnet/minecraft/client/util/ModelIdentifier;getVariant()Ljava/lang/String;
      intermediary method_4740 Lnet/minecraft/class_1091;method_4740()Ljava/lang/String;
      official a Lgsu;a()Ljava/lang/String;
    • toString

      public 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 object)
      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:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • id

      public Identifier id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • variant

      public String variant()
      Returns the value of the variant record component.
      Returns:
      the value of the variant record component