Interface IBakedModelExtension
- All Known Subinterfaces:
BakedModel
,IDynamicBakedModel
- All Known Implementing Classes:
BakedModelWrapper
,BuiltInModel
,CompositeModel.Baked
,EmptyModel.Baked
,FullPotsAccessorDemo.ClientHandler.DioritePotModel
,MegaModelTest.TransformingModelWrapper
,MultiPartBakedModel
,SeparateTransformsModel.Baked
,SimpleBakedModel
,TRSRTransformerTest.MyBakedModel
,WeightedBakedModel
public interface IBakedModelExtension
Extension interface for
BakedModel
.-
Method Summary
Modifier and TypeMethodDescriptiondefault BakedModel
applyTransform
(ItemDisplayContext transformType, PoseStack poseStack, boolean applyLeftHandTransform) Applies a transform for the giveninvalid reference
ItemTransforms.TransformType
applyLeftHandTransform
, and returns the model to be rendered.default ModelData
getModelData
(BlockAndTintGetter level, BlockPos pos, BlockState state, ModelData modelData) default TextureAtlasSprite
getParticleIcon
(ModelData data) getQuads
(@Nullable BlockState state, @Nullable Direction side, RandomSource rand, ModelData data, @Nullable RenderType renderType) A nullRenderType
is used for the breaking overlay as well as non-standard rendering, so models should return all their quads.default List
<BakedModel> getRenderPasses
(ItemStack itemStack, boolean fabulous) Gets an ordered list of baked models used to render this model as an item.default List
<RenderType> getRenderTypes
(ItemStack itemStack, boolean fabulous) Gets an ordered list ofrender types
to use when drawing this item.default ChunkRenderTypeSet
getRenderTypes
(BlockState state, RandomSource rand, ModelData data) Gets the set ofrender types
to use when drawing this block in the level.private BakedModel
self()
default TriState
useAmbientOcclusion
(BlockState state, ModelData data, RenderType renderType) Controls the AO behavior for all quads of this model.
-
Method Details
-
self
-
getQuads
default List<BakedQuad> getQuads(@Nullable @Nullable BlockState state, @Nullable @Nullable Direction side, RandomSource rand, ModelData data, @Nullable @Nullable RenderType renderType) A nullRenderType
is used for the breaking overlay as well as non-standard rendering, so models should return all their quads. -
useAmbientOcclusion
Controls the AO behavior for all quads of this model. The default behavior is to use AO unless the block emits light,TriState.TRUE
andTriState.FALSE
force AO to be enabled and disabled respectively, regardless of the block emitting light or not.BakedQuad.hasAmbientOcclusion()
can be used to disable AO for a specific quad even if this method says otherwise.This method cannot force AO if the global smooth lighting video setting is disabled.
- Parameters:
state
- the block state this model is being rendered fordata
- the model data used to render this modelrenderType
- the render type the model is being rendered with- Returns:
TriState.TRUE
to force-enable AO,TriState.FALSE
to force-disable AO orTriState.DEFAULT
to use vanilla AO behavior
-
applyTransform
default BakedModel applyTransform(ItemDisplayContext transformType, PoseStack poseStack, boolean applyLeftHandTransform) Applies a transform for the giveninvalid reference
ItemTransforms.TransformType
applyLeftHandTransform
, and returns the model to be rendered. -
getModelData
default ModelData getModelData(BlockAndTintGetter level, BlockPos pos, BlockState state, ModelData modelData) -
getParticleIcon
-
getRenderTypes
Gets the set ofrender types
to use when drawing this block in the level. Supported types are those returned byRenderType.chunkBufferLayers()
.By default, defers query to
ItemBlockRenderTypes
. -
getRenderTypes
Gets an ordered list ofrender types
to use when drawing this item. All render types using theDefaultVertexFormat.NEW_ENTITY
format are supported.This method will only be called on the models returned by
getRenderPasses(ItemStack, boolean)
.By default, defers query to
ItemBlockRenderTypes
.- See Also:
-
getRenderPasses
Gets an ordered list of baked models used to render this model as an item. Each of those models' render types will be queried viagetRenderTypes(ItemStack, boolean)
.By default, returns the model itself.
- See Also:
-