TotemParticle.java
net.minecraft.client.particle.TotemParticle
信息
- 全限定名:net.minecraft.client.particle.TotemParticle
- 类型:public class
- 包:net.minecraft.client.particle
- 源码路径:src/main/java/net/minecraft/client/particle/TotemParticle.java
- 起始行号:L10
- 继承:SimpleAnimatedParticle
- 职责:
TODO
字段/常量
- 无
内部类/嵌套类型
net.minecraft.client.particle.TotemParticle.Provider- 类型:
class - 修饰符:
public static - 源码定位:
L28 - 说明:
TODO
- 类型:
构造器
private TotemParticle(ClientLevel level, double x, double y, double z, double xa, double ya, double za, SpriteSet sprites) @ L11
- 构造器名:TotemParticle
- 源码定位:L11
- 修饰符:private
参数:
- level: ClientLevel
- x: double
- y: double
- z: double
- xa: double
- ya: double
- za: double
- sprites: SpriteSet
说明:
TODO
方法
下面的方法块按源码顺序生成。
- 无
代码
@OnlyIn(Dist.CLIENT)
public class TotemParticle extends SimpleAnimatedParticle {
private TotemParticle(ClientLevel level, double x, double y, double z, double xa, double ya, double za, SpriteSet sprites) {
super(level, x, y, z, sprites, 1.25F);
this.friction = 0.6F;
this.xd = xa;
this.yd = ya;
this.zd = za;
this.quadSize *= 0.75F;
this.lifetime = 60 + this.random.nextInt(12);
this.setSpriteFromAge(sprites);
if (this.random.nextInt(4) == 0) {
this.setColor(0.6F + this.random.nextFloat() * 0.2F, 0.6F + this.random.nextFloat() * 0.3F, this.random.nextFloat() * 0.2F);
} else {
this.setColor(0.1F + this.random.nextFloat() * 0.2F, 0.4F + this.random.nextFloat() * 0.3F, this.random.nextFloat() * 0.2F);
}
}
@OnlyIn(Dist.CLIENT)
public static class Provider implements ParticleProvider<SimpleParticleType> {
private final SpriteSet sprites;
public Provider(SpriteSet sprites) {
this.sprites = sprites;
}
public Particle createParticle(
SimpleParticleType options, ClientLevel level, double x, double y, double z, double xAux, double yAux, double zAux, RandomSource random
) {
return new TotemParticle(level, x, y, z, xAux, yAux, zAux, this.sprites);
}
}
}引用的其他类
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
继承
- 引用位置:
-
- 引用位置:
参数
- 引用位置: