Record Class ItemModel.BakingContext
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.ItemModel.BakingContext
- All Implemented Interfaces:
SpecialModelRenderer.BakingContext
- Enclosing interface:
ItemModel
public static record ItemModel.BakingContext(ModelBaker blockModelBaker, EntityModelSet entityModelSet, MaterialSet materials, PlayerSkinRenderCache playerSkinRenderCache, ItemModel missingItemModel, @Nullable RegistryContextSwapper contextSwapper, AnimationLoader.PendingAnimations pendingAnimations)
extends Record
implements SpecialModelRenderer.BakingContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.renderer.special.SpecialModelRenderer.BakingContext
SpecialModelRenderer.BakingContext.Simple -
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 MaterialSetThe field for thematerialsrecord component.private final ItemModelThe field for themissingItemModelrecord component.private final AnimationLoader.PendingAnimationsThe field for thependingAnimationsrecord component.private final PlayerSkinRenderCacheThe field for theplayerSkinRenderCacherecord component. -
Constructor Summary
ConstructorsConstructorDescriptionBakingContext(ModelBaker blockModelBaker, EntityModelSet entityModelSet, MaterialSet materials, PlayerSkinRenderCache playerSkinRenderCache, ItemModel missingItemModel, RegistryContextSwapper contextSwapper) Deprecated.BakingContext(ModelBaker blockModelBaker, EntityModelSet entityModelSet, MaterialSet materials, PlayerSkinRenderCache playerSkinRenderCache, ItemModel missingItemModel, RegistryContextSwapper contextSwapper, AnimationLoader.PendingAnimations pendingAnimations) 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 thematerialsrecord component.Returns the value of themissingItemModelrecord component.Returns the value of thependingAnimationsrecord component.Returns the value of theplayerSkinRenderCacherecord 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. -
materials
The field for thematerialsrecord component. -
playerSkinRenderCache
The field for theplayerSkinRenderCacherecord component. -
missingItemModel
The field for themissingItemModelrecord component. -
contextSwapper
The field for thecontextSwapperrecord component. -
pendingAnimations
The field for thependingAnimationsrecord component.
-
-
Constructor Details
-
BakingContext
@Deprecated public BakingContext(ModelBaker blockModelBaker, EntityModelSet entityModelSet, MaterialSet materials, PlayerSkinRenderCache playerSkinRenderCache, ItemModel missingItemModel, @Nullable RegistryContextSwapper contextSwapper) -
BakingContext
public BakingContext(ModelBaker blockModelBaker, EntityModelSet entityModelSet, MaterialSet materials, PlayerSkinRenderCache playerSkinRenderCache, ItemModel missingItemModel, @Nullable RegistryContextSwapper contextSwapper, AnimationLoader.PendingAnimations pendingAnimations) Creates an instance of aBakingContextrecord class.- Parameters:
blockModelBaker- the value for theblockModelBakerrecord componententityModelSet- the value for theentityModelSetrecord componentmaterials- the value for thematerialsrecord componentplayerSkinRenderCache- the value for theplayerSkinRenderCacherecord componentmissingItemModel- the value for themissingItemModelrecord componentcontextSwapper- the value for thecontextSwapperrecord componentpendingAnimations- the value for thependingAnimationsrecord 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.- Specified by:
entityModelSetin interfaceSpecialModelRenderer.BakingContext- Returns:
- the value of the
entityModelSetrecord component
-
materials
Returns the value of thematerialsrecord component.- Specified by:
materialsin interfaceSpecialModelRenderer.BakingContext- Returns:
- the value of the
materialsrecord component
-
playerSkinRenderCache
Returns the value of theplayerSkinRenderCacherecord component.- Specified by:
playerSkinRenderCachein interfaceSpecialModelRenderer.BakingContext- Returns:
- the value of the
playerSkinRenderCacherecord 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
-
pendingAnimations
Returns the value of thependingAnimationsrecord component.- Specified by:
pendingAnimationsin interfaceSpecialModelRenderer.BakingContext- Returns:
- the value of the
pendingAnimationsrecord component
-
BakingContext(ModelBaker, EntityModelSet, MaterialSet, PlayerSkinRenderCache, ItemModel, RegistryContextSwapper, net.neoforged.neoforge.client.entity.animation.json.AnimationLoader.PendingAnimations)instead