Record Class ModelAndTexture<T>

java.lang.Object
java.lang.Record
net.minecraft.util.ModelAndTexture<T>
Record Components:
model -
asset -

public record ModelAndTexture<T>(T model, AssetInfo asset) extends Record
Mappings:
Namespace Name
named net/minecraft/util/ModelAndTexture
intermediary net/minecraft/class_10693
official cuj
named model
intermediary comp_3572
official a
named asset
intermediary comp_3573
official b
  • Field Details Link icon

    • model Link icon

      private final T model
      The field for the model record component.
    • asset Link icon

      private final AssetInfo asset
      The field for the asset record component.
  • Constructor Details Link icon

    • ModelAndTexture Link icon

      public ModelAndTexture(T model, Identifier assetId)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/util/ModelAndTexture;<init>(Ljava/lang/Object;Lnet/minecraft/util/Identifier;)V
      intermediary <init> Lnet/minecraft/class_10693;<init>(Ljava/lang/Object;Lnet/minecraft/class_2960;)V
      official <init> Lcuj;<init>(Ljava/lang/Object;Lalr;)V
    • ModelAndTexture Link icon

      public ModelAndTexture(T t, AssetInfo assetInfo)
  • Method Details Link icon

    • createMapCodec Link icon

      public static <T> com.mojang.serialization.MapCodec<ModelAndTexture<T>> createMapCodec(com.mojang.serialization.Codec<T> modelCodec, T model)
      Mappings:
      Namespace Name Mixin selector
      named createMapCodec Lnet/minecraft/util/ModelAndTexture;createMapCodec(Lcom/mojang/serialization/Codec;Ljava/lang/Object;)Lcom/mojang/serialization/MapCodec;
      intermediary method_67154 Lnet/minecraft/class_10693;method_67154(Lcom/mojang/serialization/Codec;Ljava/lang/Object;)Lcom/mojang/serialization/MapCodec;
      official a Lcuj;a(Lcom/mojang/serialization/Codec;Ljava/lang/Object;)Lcom/mojang/serialization/MapCodec;
    • createPacketCodec Link icon

      public static <T> PacketCodec<RegistryByteBuf,ModelAndTexture<T>> createPacketCodec(PacketCodec<? super RegistryByteBuf,T> modelPacketCodec)
      Mappings:
      Namespace Name Mixin selector
      named createPacketCodec Lnet/minecraft/util/ModelAndTexture;createPacketCodec(Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;
      intermediary method_67156 Lnet/minecraft/class_10693;method_67156(Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;
      official a Lcuj;a(Lze;)Lze;
    • toString Link icon

      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 Link icon

      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 Link icon

      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.
    • model Link icon

      public T model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • asset Link icon

      public AssetInfo asset()
      Returns the value of the asset record component.
      Returns:
      the value of the asset record component