Say you wanted to emit an explosion particle whenever your block is destroyed. Emitting particles requires access to the ParticleManager
, which only exists on the MinecraftClient
instance. Let's try doing that:
public class MyBlock extends Block {
@Override
public void onBlockRemoved(BlockState before, World world, BlockPos pos, BlockState after, boolean bool) {