WhiteAshParticle.java

net.minecraft.client.particle.WhiteAshParticle

信息

  • 全限定名:net.minecraft.client.particle.WhiteAshParticle
  • 类型:public class
  • 包:net.minecraft.client.particle
  • 源码路径:src/main/java/net/minecraft/client/particle/WhiteAshParticle.java
  • 起始行号:L11
  • 继承:BaseAshSmokeParticle
  • 职责:

    TODO

字段/常量

  • COLOR_RGB24
    • 类型: int
    • 修饰符: private static final
    • 源码定位: L12
    • 说明:

      TODO

内部类/嵌套类型

  • net.minecraft.client.particle.WhiteAshParticle.Provider
    • 类型: class
    • 修饰符: public static
    • 源码定位: L22
    • 说明:

      TODO

构造器

protected WhiteAshParticle(ClientLevel level, double x, double y, double z, double xa, double ya, double za, float scale, SpriteSet sprites) @ L14

  • 构造器名:WhiteAshParticle
  • 源码定位:L14
  • 修饰符:protected

参数:

  • level: ClientLevel
  • x: double
  • y: double
  • z: double
  • xa: double
  • ya: double
  • za: double
  • scale: float
  • sprites: SpriteSet

说明:

TODO

方法

下面的方法块按源码顺序生成。

代码

@OnlyIn(Dist.CLIENT)
public class WhiteAshParticle extends BaseAshSmokeParticle {
    private static final int COLOR_RGB24 = 12235202;
 
    protected WhiteAshParticle(ClientLevel level, double x, double y, double z, double xa, double ya, double za, float scale, SpriteSet sprites) {
        super(level, x, y, z, 0.1F, -0.1F, 0.1F, xa, ya, za, scale, sprites, 0.0F, 20, 0.0125F, false);
        this.rCol = ARGB.red(12235202) / 255.0F;
        this.gCol = ARGB.green(12235202) / 255.0F;
        this.bCol = ARGB.blue(12235202) / 255.0F;
    }
 
    @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
        ) {
            double xa = random.nextFloat() * -1.9 * random.nextFloat() * 0.1;
            double ya = random.nextFloat() * -0.5 * random.nextFloat() * 0.1 * 5.0;
            double za = random.nextFloat() * -1.9 * random.nextFloat() * 0.1;
            return new WhiteAshParticle(level, x, y, z, xa, ya, za, 1.0F, this.sprites);
        }
    }
}

引用的其他类