WhiteAshParticle .java

net.minecraft.client.particle.WhiteAshParticle (class): members: COLOR_RGB24, xa, ya, za, scale, Provider, level. imports: SimpleParticleType, ARGB.

net.minecraft.client.particleclass57 linesclientextends BaseAshSmokeParticle1.6 KB

API Surface (1)

Particle createParticle(final SimpleParticleType options, final ClientLevel level, final double x, final double y, final double z, final double xAux, final double yAux, final double zAux, final RandomSource random)

Fields & Constants (9)

COLOR_RGB24
level
x
y
z
xa
ya
za
scale

Full Source

WhiteAshParticle.java57 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.particle;
2
3
import net.fabricmc.api.EnvType;
4
import net.fabricmc.api.Environment;
5
import net.minecraft.client.multiplayer.ClientLevel;
6
import net.minecraft.core.particles.SimpleParticleType;
7
import net.minecraft.util.ARGB;
8
import net.minecraft.util.RandomSource;
9
10
@Environment(EnvType.CLIENT)
11
public class WhiteAshParticle extends BaseAshSmokeParticle {
12
	private static final int COLOR_RGB24 = 12235202;
13
14
	protected WhiteAshParticle(
15
		final ClientLevel level,
16
		final double x,
17
		final double y,
18
		final double z,
19
		final double xa,
20
		final double ya,
21
		final double za,
22
		final float scale,
23
		final SpriteSet sprites
24
	) {
25
		super(level, x, y, z, 0.1F, -0.1F, 0.1F, xa, ya, za, scale, sprites, 0.0F, 20, 0.0125F, false);
26
		this.rCol = ARGB.red(12235202) / 255.0F;
27
		this.gCol = ARGB.green(12235202) / 255.0F;
28
		this.bCol = ARGB.blue(12235202) / 255.0F;
29
	}
30
31
	@Environment(EnvType.CLIENT)
32
	public static class Provider implements ParticleProvider<SimpleParticleType> {
33
		private final SpriteSet sprites;
34
35
		public Provider(final SpriteSet sprites) {
36
			this.sprites = sprites;
37
		}
38
39
		public Particle createParticle(
40
			final SimpleParticleType options,
41
			final ClientLevel level,
42
			final double x,
43
			final double y,
44
			final double z,
45
			final double xAux,
46
			final double yAux,
47
			final double zAux,
48
			final RandomSource random
49
		) {
50
			double xa = random.nextFloat() * -1.9 * random.nextFloat() * 0.1;
51
			double ya = random.nextFloat() * -0.5 * random.nextFloat() * 0.1 * 5.0;
52
			double za = random.nextFloat() * -1.9 * random.nextFloat() * 0.1;
53
			return new WhiteAshParticle(level, x, y, z, xa, ya, za, 1.0F, this.sprites);
54
		}
55
	}
56
}
57

Decompiled Minecraft 26.3 source of WhiteAshParticle (net/minecraft/client/particle/WhiteAshParticle.java) with Mojang official mappings, stored verbatim on the site.