Interface FabricBlockModels
public interface FabricBlockModels
Note: This interface is automatically implemented on
BlockModels
via Mixin and interface injection.-
Method Summary
Modifier and TypeMethodDescriptiondefault Sprite
getModelParticleSprite
(BlockState state, BlockRenderView blockView, BlockPos pos) Alternative forBlockModels.getModelParticleSprite(BlockState)
that additionally accepts aBlockRenderView
andBlockPos
to invokeFabricBlockStateModel.particleSprite(BlockRenderView, BlockPos, BlockState)
.
-
Method Details
-
getModelParticleSprite
Alternative forBlockModels.getModelParticleSprite(BlockState)
that additionally accepts aBlockRenderView
andBlockPos
to invokeFabricBlockStateModel.particleSprite(BlockRenderView, BlockPos, BlockState)
. Prefer using this method over the vanilla alternative when applicable to correctly retrieve context-aware particle sprites. If world context is not available, use the vanilla method instead of passing empty world context to this method.- Parameters:
state
- The block state whose model to retrieve the particle sprite from.blockView
- The world in which the block exists. Should not be empty (i.e. notEmptyBlockRenderView
).pos
- The position of the block in the world.- Returns:
- the particle sprite
-