Interface FabricBlockStateModelSet


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

    Modifier and Type
    Method
    Description
    default net.minecraft.client.resources.model.sprite.Material.Baked
    getParticleMaterial(net.minecraft.world.level.block.state.BlockState state, net.minecraft.client.renderer.block.BlockAndTintGetter level, net.minecraft.core.BlockPos pos)
    Alternative for BlockStateModelSet.getParticleMaterial(BlockState) that additionally accepts a BlockAndTintGetter and BlockPos to invoke FabricBlockStateModel.particleMaterial(BlockAndTintGetter, BlockPos, BlockState).
  • Method Details

    • getParticleMaterial

      default net.minecraft.client.resources.model.sprite.Material.Baked getParticleMaterial(net.minecraft.world.level.block.state.BlockState state, net.minecraft.client.renderer.block.BlockAndTintGetter level, net.minecraft.core.BlockPos pos)
      Alternative for BlockStateModelSet.getParticleMaterial(BlockState) that additionally accepts a BlockAndTintGetter and BlockPos to invoke FabricBlockStateModel.particleMaterial(BlockAndTintGetter, BlockPos, BlockState). Prefer using this method over the vanilla alternative when applicable to correctly retrieve context-aware particle materials. 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 material from.
      level - The level in which the block exists. Should not be empty (i.e. not BlockAndTintGetter.EMPTY).
      pos - The position of the block in the level.
      Returns:
      the particle material