Record Class BlockModel.BakingContext
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.BlockModel.BakingContext
- All Implemented Interfaces:
SpecialModelRenderer.BakingContext
- Enclosing interface:
BlockModel
public static record BlockModel.BakingContext(EntityModelSet entityModelSet, SpriteGetter sprites, PlayerSkinRenderCache playerSkinRenderCache, Function<BlockState, BlockStateModel> modelGetter, BlockModel missingBlockModel, AnimationLoader.PendingAnimations pendingAnimations)
extends Record
implements SpecialModelRenderer.BakingContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EntityModelSetThe field for theentityModelSetrecord component.private final BlockModelThe field for themissingBlockModelrecord component.private final Function<BlockState, BlockStateModel> The field for themodelGetterrecord component.private final AnimationLoader.PendingAnimationsThe field for thependingAnimationsrecord component.private final PlayerSkinRenderCacheThe field for theplayerSkinRenderCacherecord component.private final SpriteGetterThe field for thespritesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionBakingContext(EntityModelSet entityModelSet, SpriteGetter sprites, PlayerSkinRenderCache playerSkinRenderCache, Function<BlockState, BlockStateModel> modelGetter, BlockModel missingBlockModel) Deprecated.BakingContext(EntityModelSet entityModelSet, SpriteGetter sprites, PlayerSkinRenderCache playerSkinRenderCache, Function<BlockState, BlockStateModel> modelGetter, BlockModel missingBlockModel, AnimationLoader.PendingAnimations pendingAnimations) Creates an instance of aBakingContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns 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 themissingBlockModelrecord component.Returns the value of themodelGetterrecord component.Returns the value of thependingAnimationsrecord component.Returns the value of theplayerSkinRenderCacherecord component.sprites()Returns the value of thespritesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
entityModelSet
The field for theentityModelSetrecord component. -
sprites
The field for thespritesrecord component. -
playerSkinRenderCache
The field for theplayerSkinRenderCacherecord component. -
modelGetter
The field for themodelGetterrecord component. -
missingBlockModel
The field for themissingBlockModelrecord component. -
pendingAnimations
The field for thependingAnimationsrecord component.
-
-
Constructor Details
-
BakingContext
@Deprecated public BakingContext(EntityModelSet entityModelSet, SpriteGetter sprites, PlayerSkinRenderCache playerSkinRenderCache, Function<BlockState, BlockStateModel> modelGetter, BlockModel missingBlockModel) -
BakingContext
public BakingContext(EntityModelSet entityModelSet, SpriteGetter sprites, PlayerSkinRenderCache playerSkinRenderCache, Function<BlockState, BlockStateModel> modelGetter, BlockModel missingBlockModel, AnimationLoader.PendingAnimations pendingAnimations) Creates an instance of aBakingContextrecord class.- Parameters:
entityModelSet- the value for theentityModelSetrecord componentsprites- the value for thespritesrecord componentplayerSkinRenderCache- the value for theplayerSkinRenderCacherecord componentmodelGetter- the value for themodelGetterrecord componentmissingBlockModel- the value for themissingBlockModelrecord componentpendingAnimations- the value for thependingAnimationsrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
entityModelSet
Returns the value of theentityModelSetrecord component.- Specified by:
entityModelSetin interfaceSpecialModelRenderer.BakingContext- Returns:
- the value of the
entityModelSetrecord component
-
sprites
Returns the value of thespritesrecord component.- Specified by:
spritesin interfaceSpecialModelRenderer.BakingContext- Returns:
- the value of the
spritesrecord component
-
playerSkinRenderCache
Returns the value of theplayerSkinRenderCacherecord component.- Specified by:
playerSkinRenderCachein interfaceSpecialModelRenderer.BakingContext- Returns:
- the value of the
playerSkinRenderCacherecord component
-
modelGetter
Returns the value of themodelGetterrecord component.- Returns:
- the value of the
modelGetterrecord component
-
missingBlockModel
Returns the value of themissingBlockModelrecord component.- Returns:
- the value of the
missingBlockModelrecord component
-
pendingAnimations
Returns the value of thependingAnimationsrecord component.- Specified by:
pendingAnimationsin interfaceSpecialModelRenderer.BakingContext- Returns:
- the value of the
pendingAnimationsrecord component
-
BakingContext(EntityModelSet, SpriteGetter, PlayerSkinRenderCache, Function, BlockModel, net.neoforged.neoforge.client.entity.animation.json.AnimationLoader.PendingAnimations)instead