SonicBoomParticle .java

net.minecraft.client.particle.SonicBoomParticle (class, 41 lines): members: Provider. imports: SimpleParticleType, ClientLevel, RandomSource.

net.minecraft.client.particleclass41 linesclientextends HugeExplosionParticle1.2 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)

Code Graph: Dependencies (7)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

SonicBoomParticle.java41 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.RandomSource;
8
9
@Environment(EnvType.CLIENT)
10
public class SonicBoomParticle extends HugeExplosionParticle {
11
	protected SonicBoomParticle(final ClientLevel level, final double x, final double y, final double z, final double size, final SpriteSet sprites) {
12
		super(level, x, y, z, size, sprites);
13
		this.lifetime = 16;
14
		this.quadSize = 1.5F;
15
		this.setSpriteFromAge(sprites);
16
	}
17
18
	@Environment(EnvType.CLIENT)
19
	public static class Provider implements ParticleProvider<SimpleParticleType> {
20
		private final SpriteSet sprites;
21
22
		public Provider(final SpriteSet sprites) {
23
			this.sprites = sprites;
24
		}
25
26
		public Particle createParticle(
27
			final SimpleParticleType options,
28
			final ClientLevel level,
29
			final double x,
30
			final double y,
31
			final double z,
32
			final double xAux,
33
			final double yAux,
34
			final double zAux,
35
			final RandomSource random
36
		) {
37
			return new SonicBoomParticle(level, x, y, z, xAux, this.sprites);
38
		}
39
	}
40
}
41

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