Interface ModelModifier.AfterBake
- Enclosing class:
ModelModifier
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
The context for an after bake model modification event. -
Method Summary
Modifier and TypeMethodDescription@Nullable BakedModel
modifyModelAfterBake
(@Nullable BakedModel model, ModelModifier.AfterBake.Context context) This handler is invoked to allow modification of the baked model instance right after it is baked and before it is cached.
-
Method Details
-
modifyModelAfterBake
@Nullable @Nullable BakedModel modifyModelAfterBake(@Nullable @Nullable BakedModel model, ModelModifier.AfterBake.Context context) This handler is invoked to allow modification of the baked model instance right after it is baked and before it is cached.Note that the passed baked model may be null and that this handler may return a null baked model, since
UnbakedModel.bake(net.minecraft.client.render.model.Baker, java.util.function.Function<net.minecraft.client.util.SpriteIdentifier, net.minecraft.client.texture.Sprite>, net.minecraft.client.render.model.ModelBakeSettings)
andBaker.bake(net.minecraft.util.Identifier, net.minecraft.client.render.model.ModelBakeSettings)
may also return null baked models. Null baked models are automatically mapped to the missing model during model retrieval.For further information, see the docs of
ModelLoadingPlugin.Context.modifyModelAfterBake()
.- Parameters:
model
- the current baked model instancecontext
- context with additional information about the model/loader- Returns:
- the model that should be used in this scenario. If no changes are needed, just return
model
as-is. - See Also:
-