DustPlumeParticle .java

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

net.minecraft.client.particleclass62 linesclientextends BaseAshSmokeParticle1.7 KB

API Surface (2)

void tick()
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

DustPlumeParticle.java62 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 DustPlumeParticle extends BaseAshSmokeParticle {
12
	private static final int COLOR_RGB24 = 12235202;
13
14
	protected DustPlumeParticle(
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.7F, 0.6F, 0.7F, xa, ya + 0.15F, za, scale, sprites, 0.5F, 7, 0.5F, false);
26
		float colorShift = this.random.nextFloat() * 0.2F;
27
		this.rCol = ARGB.red(12235202) / 255.0F - colorShift;
28
		this.gCol = ARGB.green(12235202) / 255.0F - colorShift;
29
		this.bCol = ARGB.blue(12235202) / 255.0F - colorShift;
30
	}
31
32
	@Override
33
	public void tick() {
34
		this.gravity = 0.88F * this.gravity;
35
		this.friction = 0.92F * this.friction;
36
		super.tick();
37
	}
38
39
	@Environment(EnvType.CLIENT)
40
	public static class Provider implements ParticleProvider<SimpleParticleType> {
41
		private final SpriteSet sprites;
42
43
		public Provider(final SpriteSet sprites) {
44
			this.sprites = sprites;
45
		}
46
47
		public Particle createParticle(
48
			final SimpleParticleType options,
49
			final ClientLevel level,
50
			final double x,
51
			final double y,
52
			final double z,
53
			final double xAux,
54
			final double yAux,
55
			final double zAux,
56
			final RandomSource random
57
		) {
58
			return new DustPlumeParticle(level, x, y, z, xAux, yAux, zAux, 1.0F, this.sprites);
59
		}
60
	}
61
}
62

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