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 ResourceLocation
The field for thebase
record component.static final com.mojang.serialization.MapCodec
<SpecialModelWrapper.Unbaked> private final SpecialModelRenderer.Unbaked
The field for thespecialModel
record component. -
Constructor Summary
ConstructorsConstructorDescriptionUnbaked
(ResourceLocation base, SpecialModelRenderer.Unbaked specialModel) Creates an instance of aUnbaked
record class. -
Method Summary
Modifier and TypeMethodDescriptionbake
(ItemModel.BakingContext p_388760_) base()
Returns the value of thebase
record component.final boolean
Indicates whether some other object is "equal to" this one.private ModelRenderProperties
getProperties
(ItemModel.BakingContext p_404963_) final int
hashCode()
Returns a hash code value for this object.void
resolveDependencies
(ResolvableModel.Resolver p_387171_) Returns the value of thespecialModel
record component.final String
toString()
Returns a string representation of this record class.com.mojang.serialization.MapCodec
<SpecialModelWrapper.Unbaked> type()
-
Field Details
-
base
The field for thebase
record component. -
specialModel
The field for thespecialModel
record component. -
MAP_CODEC
-
-
Constructor Details
-
Unbaked
Creates an instance of aUnbaked
record class.- Parameters:
base
- the value for thebase
record componentspecialModel
- the value for thespecialModel
record component
-
-
Method Details
-
resolveDependencies
- Specified by:
resolveDependencies
in interfaceResolvableModel
-
bake
- Specified by:
bake
in interfaceItemModel.Unbaked
-
getProperties
-
type
- Specified by:
type
in 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 thebase
record component.- Returns:
- the value of the
base
record component
-
specialModel
Returns the value of thespecialModel
record component.- Returns:
- the value of the
specialModel
record component
-