Record Class SpecialModelWrapper.Unbaked
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.SpecialModelWrapper.Unbaked
- All Implemented Interfaces:
ItemModel.Unbaked,ResolvableModel
- Enclosing class:
SpecialModelWrapper<T>
public static record SpecialModelWrapper.Unbaked(ResourceLocation base, SpecialModelRenderer.Unbaked specialModel)
extends Record
implements ItemModel.Unbaked
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.resources.model.ResolvableModel
ResolvableModel.Resolver -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResourceLocationThe field for thebaserecord component.static final com.mojang.serialization.MapCodec<SpecialModelWrapper.Unbaked> private final SpecialModelRenderer.UnbakedThe field for thespecialModelrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionUnbaked(ResourceLocation base, SpecialModelRenderer.Unbaked specialModel) Creates an instance of aUnbakedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbake(ItemModel.BakingContext p_388760_) base()Returns the value of thebaserecord component.final booleanIndicates whether some other object is "equal to" this one.private ModelRenderPropertiesgetProperties(ItemModel.BakingContext pContext) final inthashCode()Returns a hash code value for this object.voidresolveDependencies(ResolvableModel.Resolver p_387171_) Returns the value of thespecialModelrecord component.final StringtoString()Returns a string representation of this record class.com.mojang.serialization.MapCodec<SpecialModelWrapper.Unbaked> type()
-
Field Details
-
base
The field for thebaserecord component. -
specialModel
The field for thespecialModelrecord component. -
MAP_CODEC
-
-
Constructor Details
-
Unbaked
Creates an instance of aUnbakedrecord class.- Parameters:
base- the value for thebaserecord componentspecialModel- the value for thespecialModelrecord component
-
-
Method Details
-
resolveDependencies
- Specified by:
resolveDependenciesin interfaceResolvableModel
-
bake
- Specified by:
bakein interfaceItemModel.Unbaked
-
getProperties
-
type
- Specified by:
typein interfaceItemModel.Unbaked
-
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). -
base
Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
specialModel
Returns the value of thespecialModelrecord component.- Returns:
- the value of the
specialModelrecord component
-