Record Class SingleVariant.Unbaked
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.SingleVariant.Unbaked
- All Implemented Interfaces:
BlockStateModel.Unbaked,ResolvableModel
- Enclosing class:
SingleVariant
public static record SingleVariant.Unbaked(Variant variant)
extends Record
implements BlockStateModel.Unbaked
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.resources.model.ResolvableModel
ResolvableModel.Resolver -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SingleVariant.Unbaked> static final com.mojang.serialization.MapCodec<SingleVariant.Unbaked> private final VariantThe field for thevariantrecord component.Fields inherited from interface net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked
ELEMENT_CODEC, HARDCODED_WEIGHTED_CODEC, SINGLE_MODEL_CODEC, WEIGHTED_MODEL_CODEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbake(ModelBaker p_410856_) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidresolveDependencies(ResolvableModel.Resolver p_410724_) final StringtoString()Returns a string representation of this record class.variant()Returns the value of thevariantrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked
asRoot
-
Field Details
-
variant
The field for thevariantrecord component. -
MAP_CODEC
-
CODEC
-
-
Constructor Details
-
Unbaked
Creates an instance of aUnbakedrecord class.- Parameters:
variant- the value for thevariantrecord component
-
-
Method Details
-
bake
- Specified by:
bakein interfaceBlockStateModel.Unbaked
-
resolveDependencies
- Specified by:
resolveDependenciesin interfaceResolvableModel
-
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). -
variant
Returns the value of thevariantrecord component.- Returns:
- the value of the
variantrecord component
-