UntintedParticleLeavesBlock .java

net.minecraft.world.level.block.UntintedParticleLeavesBlock (class, 29 lines): members: leafParticle, leafParticleChance, ambientLeavesBlockSoundPlayer.

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

API Surface (1)

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

Fields & Constants (3)

leafParticle
leafParticleChance
ambientLeavesBlockSoundPlayer

Full Source

UntintedParticleLeavesBlock.java29 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.ParticleOptions;
5
import net.minecraft.util.ParticleUtils;
6
import net.minecraft.util.RandomSource;
7
import net.minecraft.world.level.Level;
8
import net.minecraft.world.level.block.sounds.AmbientLeavesBlockSoundPlayer;
9
import net.minecraft.world.level.block.state.BlockBehaviour;
10
11
public class UntintedParticleLeavesBlock extends FallingParticlesLeavesBlock {
12
	protected final ParticleOptions leafParticle;
13
14
	public UntintedParticleLeavesBlock(
15
		final float leafParticleChance,
16
		final ParticleOptions leafParticle,
17
		final AmbientLeavesBlockSoundPlayer ambientLeavesBlockSoundPlayer,
18
		final BlockBehaviour.Properties properties
19
	) {
20
		super(leafParticleChance, ambientLeavesBlockSoundPlayer, properties);
21
		this.leafParticle = leafParticle;
22
	}
23
24
	@Override
25
	protected void spawnFallingLeavesParticle(final Level level, final BlockPos pos, final RandomSource random) {
26
		ParticleUtils.spawnParticleBelow(level, pos, random, this.leafParticle);
27
	}
28
}
29

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