Record Class ItemModel.BakingContext
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.ItemModel.BakingContext
- Enclosing interface:
ItemModel
public static record ItemModel.BakingContext(ModelBaker blockModelBaker, EntityModelSet entityModelSet, ItemModel missingItemModel, @Nullable RegistryContextSwapper contextSwapper)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ModelBaker
The field for theblockModelBaker
record component.private final RegistryContextSwapper
The field for thecontextSwapper
record component.private final EntityModelSet
The field for theentityModelSet
record component.private final ItemModel
The field for themissingItemModel
record component. -
Constructor Summary
ConstructorsConstructorDescriptionBakingContext
(ModelBaker blockModelBaker, EntityModelSet entityModelSet, ItemModel missingItemModel, RegistryContextSwapper contextSwapper) Creates an instance of aBakingContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockModelBaker
record component.Returns the value of thecontextSwapper
record component.Returns the value of theentityModelSet
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themissingItemModel
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
blockModelBaker
The field for theblockModelBaker
record component. -
entityModelSet
The field for theentityModelSet
record component. -
missingItemModel
The field for themissingItemModel
record component. -
contextSwapper
The field for thecontextSwapper
record component.
-
-
Constructor Details
-
BakingContext
public BakingContext(ModelBaker blockModelBaker, EntityModelSet entityModelSet, ItemModel missingItemModel, @Nullable RegistryContextSwapper contextSwapper) Creates an instance of aBakingContext
record class.- Parameters:
blockModelBaker
- the value for theblockModelBaker
record componententityModelSet
- the value for theentityModelSet
record componentmissingItemModel
- the value for themissingItemModel
record componentcontextSwapper
- the value for thecontextSwapper
record component
-
-
Method Details
-
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)
. -
blockModelBaker
Returns the value of theblockModelBaker
record component.- Returns:
- the value of the
blockModelBaker
record component
-
entityModelSet
Returns the value of theentityModelSet
record component.- Returns:
- the value of the
entityModelSet
record component
-
missingItemModel
Returns the value of themissingItemModel
record component.- Returns:
- the value of the
missingItemModel
record component
-
contextSwapper
Returns the value of thecontextSwapper
record component.- Returns:
- the value of the
contextSwapper
record component
-