Interface FabricBlockModelShaper


public interface FabricBlockModelShaper
Note: This interface is automatically implemented on BlockModelShaper via Mixin and interface injection.
  • Method Summary

    Modifier and Type
    Method
    Description
    default net.minecraft.client.renderer.texture.TextureAtlasSprite
    getParticleIcon(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockAndTintGetter level, net.minecraft.core.BlockPos pos)
    Alternative for BlockModelShaper.getParticleIcon(BlockState) that additionally accepts a BlockAndTintGetter and BlockPos to invoke FabricBlockStateModel.particleIcon(BlockAndTintGetter, BlockPos, BlockState).
  • Method Details

    • getParticleIcon

      default net.minecraft.client.renderer.texture.TextureAtlasSprite getParticleIcon(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockAndTintGetter level, net.minecraft.core.BlockPos pos)
      Alternative for BlockModelShaper.getParticleIcon(BlockState) that additionally accepts a BlockAndTintGetter and BlockPos to invoke FabricBlockStateModel.particleIcon(BlockAndTintGetter, BlockPos, BlockState). Prefer using this method over the vanilla alternative when applicable to correctly retrieve context-aware particle sprites. If level context is not available, use the vanilla method instead of passing empty level context to this method.
      Parameters:
      state - The block state whose model to retrieve the particle sprite from.
      level - The level in which the block exists. Should not be empty (i.e. not EmptyBlockAndTintGetter).
      pos - The position of the block in the level.
      Returns:
      the particle sprite