TintedParticleLeavesBlock .java

net.minecraft.world.level.block.TintedParticleLeavesBlock (class, 23 lines): members: spawnFallingLeavesParticle. imports: AmbientLeavesBlockSoundPlayer.

net.minecraft.world.level.blockclass23 linescommonextends FallingParticlesLeavesBlock1.0 KB

API Surface (1)

void spawnFallingLeavesParticle(final Level level, final BlockPos pos, final RandomSource random)

Full Source

TintedParticleLeavesBlock.java23 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.block;
2
3
import net.minecraft.core.BlockPos;
4
import net.minecraft.core.particles.ColorParticleOption;
5
import net.minecraft.core.particles.ParticleTypes;
6
import net.minecraft.util.ParticleUtils;
7
import net.minecraft.util.RandomSource;
8
import net.minecraft.world.level.Level;
9
import net.minecraft.world.level.block.sounds.AmbientLeavesBlockSoundPlayer;
10
import net.minecraft.world.level.block.state.BlockBehaviour;
11
12
public class TintedParticleLeavesBlock extends FallingParticlesLeavesBlock {
13
	public TintedParticleLeavesBlock(final float leafParticleChance, final BlockBehaviour.Properties properties) {
14
		super(leafParticleChance, AmbientLeavesBlockSoundPlayer.noAmbientSound(), properties);
15
	}
16
17
	@Override
18
	protected void spawnFallingLeavesParticle(final Level level, final BlockPos pos, final RandomSource random) {
19
		ColorParticleOption particle = ColorParticleOption.create(ParticleTypes.TINTED_LEAVES, level.getClientLeafTintColor(pos));
20
		ParticleUtils.spawnParticleBelow(level, pos, random, particle);
21
	}
22
}
23

Decompiled Minecraft 26.3 source of TintedParticleLeavesBlock (net/minecraft/world/level/block/TintedParticleLeavesBlock.java) with Mojang official mappings, stored verbatim on the site.