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/ModelVariantintermediary net/minecraft/class_813official gtjnamed modelIdintermediary comp_3379official cnamed modelStateintermediary comp_3754official d
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.client.render.model.ResolvableModel
ResolvableModel.Resolver -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ModelVariant> static final com.mojang.serialization.MapCodec<ModelVariant> private final IdentifierThe field for themodelIdrecord component.private final ModelVariant.ModelStateThe field for themodelStaterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionModelVariant(Identifier model) ModelVariant(Identifier location, ModelVariant.ModelState modelState) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.modelId()Returns the value of themodelIdrecord component.Returns the value of themodelStaterecord component.voidresolve(ResolvableModel.Resolver resolver) setState(ModelVariant.ModelState modelState) final StringtoString()Returns a string representation of this record class.with(ModelVariantOperator variantOperator) withModel(Identifier modelId) withRotationX(AxisRotation amount) withRotationY(AxisRotation amount) withUVLock(boolean uvLock)
-
Field Details
-
modelId
The field for themodelIdrecord component. -
modelState
The field for themodelStaterecord component. -
MAP_CODEC
- Mappings:
Namespace Name Mixin selector named MAP_CODECLnet/minecraft/client/render/model/json/ModelVariant;MAP_CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_57947Lnet/minecraft/class_813;field_57947:Lcom/mojang/serialization/MapCodec;official aLgtj;a:Lcom/mojang/serialization/MapCodec;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/client/render/model/json/ModelVariant;CODEC:Lcom/mojang/serialization/Codec;intermediary field_56933Lnet/minecraft/class_813;field_56933:Lcom/mojang/serialization/Codec;official bLgtj;b:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
ModelVariant
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/render/model/json/ModelVariant;<init>(Lnet/minecraft/util/Identifier;)Vintermediary <init>Lnet/minecraft/class_813;<init>(Lnet/minecraft/class_2960;)Vofficial <init>Lgtj;<init>(Lalr;)V
-
ModelVariant
- 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;)Vintermediary <init>Lnet/minecraft/class_813;<init>(Lnet/minecraft/class_2960;Lnet/minecraft/class_813$class_10803;)Vofficial <init>Lgtj;<init>(Lalr;Lgtj$a;)V
-
-
Method Details
-
withRotationX
- Mappings:
Namespace Name Mixin selector named withRotationXLnet/minecraft/client/render/model/json/ModelVariant;withRotationX(Lnet/minecraft/util/math/AxisRotation;)Lnet/minecraft/client/render/model/json/ModelVariant;intermediary method_67940Lnet/minecraft/class_813;method_67940(Lnet/minecraft/class_10821;)Lnet/minecraft/class_813;official aLgtj;a(Li;)Lgtj;
-
withRotationY
- Mappings:
Namespace Name Mixin selector named withRotationYLnet/minecraft/client/render/model/json/ModelVariant;withRotationY(Lnet/minecraft/util/math/AxisRotation;)Lnet/minecraft/client/render/model/json/ModelVariant;intermediary method_67942Lnet/minecraft/class_813;method_67942(Lnet/minecraft/class_10821;)Lnet/minecraft/class_813;official bLgtj;b(Li;)Lgtj;
-
withUVLock
- Mappings:
Namespace Name Mixin selector named withUVLockLnet/minecraft/client/render/model/json/ModelVariant;withUVLock(Z)Lnet/minecraft/client/render/model/json/ModelVariant;intermediary method_67941Lnet/minecraft/class_813;method_67941(Z)Lnet/minecraft/class_813;official aLgtj;a(Z)Lgtj;
-
withModel
- Mappings:
Namespace Name Mixin selector named withModelLnet/minecraft/client/render/model/json/ModelVariant;withModel(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/render/model/json/ModelVariant;intermediary method_67936Lnet/minecraft/class_813;method_67936(Lnet/minecraft/class_2960;)Lnet/minecraft/class_813;official aLgtj;a(Lalr;)Lgtj;
-
setState
- Mappings:
Namespace Name Mixin selector named setStateLnet/minecraft/client/render/model/json/ModelVariant;setState(Lnet/minecraft/client/render/model/json/ModelVariant$ModelState;)Lnet/minecraft/client/render/model/json/ModelVariant;intermediary method_67938Lnet/minecraft/class_813;method_67938(Lnet/minecraft/class_813$class_10803;)Lnet/minecraft/class_813;official aLgtj;a(Lgtj$a;)Lgtj;
-
with
- Mappings:
Namespace Name Mixin selector named withLnet/minecraft/client/render/model/json/ModelVariant;with(Lnet/minecraft/client/render/model/json/ModelVariantOperator;)Lnet/minecraft/client/render/model/json/ModelVariant;intermediary method_67939Lnet/minecraft/class_813;method_67939(Lnet/minecraft/class_10804;)Lnet/minecraft/class_813;official aLgtj;a(Lgtk;)Lgtj;
-
bake
- Specified by:
bakein interfaceBlockModelPart.Unbaked- Mappings:
Namespace Name Mixin selector named bakeLnet/minecraft/client/render/model/BlockModelPart$Unbaked;bake(Lnet/minecraft/client/render/model/Baker;)Lnet/minecraft/client/render/model/BlockModelPart;intermediary method_68510Lnet/minecraft/class_10889$class_10890;method_68510(Lnet/minecraft/class_7775;)Lnet/minecraft/class_10889;official aLgsz$a;a(Lhmz;)Lgsz;
-
resolve
- Specified by:
resolvein interfaceResolvableModel- Mappings:
Namespace Name Mixin selector named resolveLnet/minecraft/client/render/model/ResolvableModel;resolve(Lnet/minecraft/client/render/model/ResolvableModel$Resolver;)Vintermediary method_62326Lnet/minecraft/class_10526;method_62326(Lnet/minecraft/class_10526$class_10103;)Vofficial aLhnh;a(Lhnh$a;)V
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
modelId
Returns the value of themodelIdrecord component.- Returns:
- the value of the
modelIdrecord component
-
modelState
Returns the value of themodelStaterecord component.- Returns:
- the value of the
modelStaterecord component
-