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 ModelBakerThe field for theblockModelBakerrecord component.private final RegistryContextSwapperThe field for thecontextSwapperrecord component.private final EntityModelSetThe field for theentityModelSetrecord component.private final ItemModelThe field for themissingItemModelrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionBakingContext(ModelBaker blockModelBaker, EntityModelSet entityModelSet, ItemModel missingItemModel, RegistryContextSwapper contextSwapper) Creates an instance of aBakingContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockModelBakerrecord component.Returns the value of thecontextSwapperrecord component.Returns the value of theentityModelSetrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themissingItemModelrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
blockModelBaker
The field for theblockModelBakerrecord component. -
entityModelSet
The field for theentityModelSetrecord component. -
missingItemModel
The field for themissingItemModelrecord component. -
contextSwapper
The field for thecontextSwapperrecord component.
-
-
Constructor Details
-
BakingContext
public BakingContext(ModelBaker blockModelBaker, EntityModelSet entityModelSet, ItemModel missingItemModel, @Nullable RegistryContextSwapper contextSwapper) Creates an instance of aBakingContextrecord class.- Parameters:
blockModelBaker- the value for theblockModelBakerrecord componententityModelSet- the value for theentityModelSetrecord componentmissingItemModel- the value for themissingItemModelrecord componentcontextSwapper- the value for thecontextSwapperrecord 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 theblockModelBakerrecord component.- Returns:
- the value of the
blockModelBakerrecord component
-
entityModelSet
Returns the value of theentityModelSetrecord component.- Returns:
- the value of the
entityModelSetrecord component
-
missingItemModel
Returns the value of themissingItemModelrecord component.- Returns:
- the value of the
missingItemModelrecord component
-
contextSwapper
Returns the value of thecontextSwapperrecord component.- Returns:
- the value of the
contextSwapperrecord component
-