RisingParticle .java

net.minecraft.client.particle.RisingParticle (class, 24 lines): extends SingleQuadParticle. members: zd. imports: TextureAtlasSprite, ClientLevel, EnvType.

net.minecraft.client.particleclass24 linesclientextends SingleQuadParticle1008 B

API Surface (0)

No public/protected methods detected (fields or constants only).

Fields & Constants (1)

zd

Code Graph: Dependencies (4)

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

Full Source

RisingParticle.java24 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.client.renderer.texture.TextureAtlasSprite;
7
8
@Environment(EnvType.CLIENT)
9
public abstract class RisingParticle extends SingleQuadParticle {
10
	protected RisingParticle(
11
		final ClientLevel level, final double x, final double y, final double z, final double xd, final double yd, final double zd, final TextureAtlasSprite sprite
12
	) {
13
		super(level, x, y, z, xd, yd, zd, sprite);
14
		this.friction = 0.96F;
15
		this.xd = this.xd * 0.01F + xd;
16
		this.yd = this.yd * 0.01F + yd;
17
		this.zd = this.zd * 0.01F + zd;
18
		this.x = this.x + (this.random.nextFloat() - this.random.nextFloat()) * 0.05F;
19
		this.y = this.y + (this.random.nextFloat() - this.random.nextFloat()) * 0.05F;
20
		this.z = this.z + (this.random.nextFloat() - this.random.nextFloat()) * 0.05F;
21
		this.lifetime = (int)(8.0 / (this.random.nextFloat() * 0.8 + 0.2)) + 4;
22
	}
23
}
24

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