Record Class ModelVariant

java.lang.Object
java.lang.Record
net.minecraft.client.render.model.json.ModelVariant
Record Components:
modelId -
modelState -
All Implemented Interfaces:
BlockModelPart.Unbaked, ResolvableModel

@Environment(CLIENT) public record ModelVariant(Identifier modelId, ModelVariant.ModelState modelState) extends Record implements BlockModelPart.Unbaked
Mappings:
Namespace Name
named net/minecraft/client/render/model/json/ModelVariant
intermediary net/minecraft/class_813
official gtj
named modelId
intermediary comp_3379
official c
named modelState
intermediary comp_3754
official d
  • Field Details Link icon

    • modelId Link icon

      private final Identifier modelId
      The field for the modelId record component.
    • modelState Link icon

      private final ModelVariant.ModelState modelState
      The field for the modelState record component.
    • MAP_CODEC Link icon

      public static final com.mojang.serialization.MapCodec<ModelVariant> MAP_CODEC
      Mappings:
      Namespace Name Mixin selector
      named MAP_CODEC Lnet/minecraft/client/render/model/json/ModelVariant;MAP_CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_57947 Lnet/minecraft/class_813;field_57947:Lcom/mojang/serialization/MapCodec;
      official a Lgtj;a:Lcom/mojang/serialization/MapCodec;
    • CODEC Link icon

      public static final com.mojang.serialization.Codec<ModelVariant> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/client/render/model/json/ModelVariant;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_56933 Lnet/minecraft/class_813;field_56933:Lcom/mojang/serialization/Codec;
      official b Lgtj;b:Lcom/mojang/serialization/Codec;
  • Constructor Details Link icon

    • ModelVariant Link icon

      public ModelVariant(Identifier model)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/render/model/json/ModelVariant;<init>(Lnet/minecraft/util/Identifier;)V
      intermediary <init> Lnet/minecraft/class_813;<init>(Lnet/minecraft/class_2960;)V
      official <init> Lgtj;<init>(Lalr;)V
    • ModelVariant Link icon

      public ModelVariant(Identifier location, ModelVariant.ModelState modelState)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/render/model/json/ModelVariant;<init>(Lnet/minecraft/util/Identifier;Lnet/minecraft/client/render/model/json/ModelVariant$ModelState;)V
      intermediary <init> Lnet/minecraft/class_813;<init>(Lnet/minecraft/class_2960;Lnet/minecraft/class_813$class_10803;)V
      official <init> Lgtj;<init>(Lalr;Lgtj$a;)V
  • Method Details Link icon

    • withRotationX Link icon

      public ModelVariant withRotationX(AxisRotation amount)
      Mappings:
      Namespace Name Mixin selector
      named withRotationX Lnet/minecraft/client/render/model/json/ModelVariant;withRotationX(Lnet/minecraft/util/math/AxisRotation;)Lnet/minecraft/client/render/model/json/ModelVariant;
      intermediary method_67940 Lnet/minecraft/class_813;method_67940(Lnet/minecraft/class_10821;)Lnet/minecraft/class_813;
      official a Lgtj;a(Li;)Lgtj;
    • withRotationY Link icon

      public ModelVariant withRotationY(AxisRotation amount)
      Mappings:
      Namespace Name Mixin selector
      named withRotationY Lnet/minecraft/client/render/model/json/ModelVariant;withRotationY(Lnet/minecraft/util/math/AxisRotation;)Lnet/minecraft/client/render/model/json/ModelVariant;
      intermediary method_67942 Lnet/minecraft/class_813;method_67942(Lnet/minecraft/class_10821;)Lnet/minecraft/class_813;
      official b Lgtj;b(Li;)Lgtj;
    • withUVLock Link icon

      public ModelVariant withUVLock(boolean uvLock)
      Mappings:
      Namespace Name Mixin selector
      named withUVLock Lnet/minecraft/client/render/model/json/ModelVariant;withUVLock(Z)Lnet/minecraft/client/render/model/json/ModelVariant;
      intermediary method_67941 Lnet/minecraft/class_813;method_67941(Z)Lnet/minecraft/class_813;
      official a Lgtj;a(Z)Lgtj;
    • withModel Link icon

      public ModelVariant withModel(Identifier modelId)
      Mappings:
      Namespace Name Mixin selector
      named withModel Lnet/minecraft/client/render/model/json/ModelVariant;withModel(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/render/model/json/ModelVariant;
      intermediary method_67936 Lnet/minecraft/class_813;method_67936(Lnet/minecraft/class_2960;)Lnet/minecraft/class_813;
      official a Lgtj;a(Lalr;)Lgtj;
    • setState Link icon

      public ModelVariant setState(ModelVariant.ModelState modelState)
      Mappings:
      Namespace Name Mixin selector
      named setState Lnet/minecraft/client/render/model/json/ModelVariant;setState(Lnet/minecraft/client/render/model/json/ModelVariant$ModelState;)Lnet/minecraft/client/render/model/json/ModelVariant;
      intermediary method_67938 Lnet/minecraft/class_813;method_67938(Lnet/minecraft/class_813$class_10803;)Lnet/minecraft/class_813;
      official a Lgtj;a(Lgtj$a;)Lgtj;
    • with Link icon

      public ModelVariant with(ModelVariantOperator variantOperator)
      Mappings:
      Namespace Name Mixin selector
      named with Lnet/minecraft/client/render/model/json/ModelVariant;with(Lnet/minecraft/client/render/model/json/ModelVariantOperator;)Lnet/minecraft/client/render/model/json/ModelVariant;
      intermediary method_67939 Lnet/minecraft/class_813;method_67939(Lnet/minecraft/class_10804;)Lnet/minecraft/class_813;
      official a Lgtj;a(Lgtk;)Lgtj;
    • bake Link icon

      public BlockModelPart bake(Baker baker)
      Specified by:
      bake in interface BlockModelPart.Unbaked
      Mappings:
      Namespace Name Mixin selector
      named bake Lnet/minecraft/client/render/model/BlockModelPart$Unbaked;bake(Lnet/minecraft/client/render/model/Baker;)Lnet/minecraft/client/render/model/BlockModelPart;
      intermediary method_68510 Lnet/minecraft/class_10889$class_10890;method_68510(Lnet/minecraft/class_7775;)Lnet/minecraft/class_10889;
      official a Lgsz$a;a(Lhmz;)Lgsz;
    • resolve Link icon

      public void resolve(ResolvableModel.Resolver resolver)
      Specified by:
      resolve in interface ResolvableModel
      Mappings:
      Namespace Name Mixin selector
      named resolve Lnet/minecraft/client/render/model/ResolvableModel;resolve(Lnet/minecraft/client/render/model/ResolvableModel$Resolver;)V
      intermediary method_62326 Lnet/minecraft/class_10526;method_62326(Lnet/minecraft/class_10526$class_10103;)V
      official a Lhnh;a(Lhnh$a;)V
    • 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 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.
    • modelId Link icon

      public Identifier modelId()
      Returns the value of the modelId record component.
      Returns:
      the value of the modelId record component
    • modelState Link icon

      public ModelVariant.ModelState modelState()
      Returns the value of the modelState record component.
      Returns:
      the value of the modelState record component