FabricBakedModel

public interface FabricBakedModel

Interface for baked models that output meshes with enhanced rendering features. Can also be used to generate or customize outputs based on world state instead of or in addition to block state when render chunks are rebuilt.

Note for Renderer implementors: Fabric causes BakedModel to extend this interface with isVanillaAdapter == true and to produce standard vertex data. This means any BakedModel instance can be safely cast to this interface without an instanceof check.

Functions

emitBlockQuads
Link copied to clipboard
abstract void emitBlockQuads(BlockRenderView blockView, BlockState state, BlockPos pos, Supplier<Random> randomSupplier, RenderContext context)
This method will be called during chunk rebuilds to generate both the static anddynamic portions of a block model when the model implements this interface and isVanillaAdapter returns false.
emitItemQuads
Link copied to clipboard
abstract void emitItemQuads(ItemStack stack, Supplier<Random> randomSupplier, RenderContext context)
This method will be called during item rendering to generate both the static anddynamic portions of an item model when the model implements this interface and isVanillaAdapter returns false.
isVanillaAdapter
Link copied to clipboard
abstract boolean isVanillaAdapter()
When true, signals renderer this producer is implemented through getQuads.Also means the model does not rely on any non-vanilla features.Allows the renderer to optimize or route vanilla models through the unmodified vanilla pipeline if desired.

Inheritors

ForwardingBakedModel
Link copied to clipboard
MixinBakedModel
Link copied to clipboard
MixinMultipartBakedModel
Link copied to clipboard
MixinWeightedBakedModel
Link copied to clipboard

Sources

jvm source
Link copied to clipboard