DustPlumeParticle.java

net.minecraft.client.particle.DustPlumeParticle

信息

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

    TODO

字段/常量

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

      TODO

内部类/嵌套类型

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

      TODO

构造器

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

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

参数:

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

说明:

TODO

方法

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

public void tick() @ L22

  • 方法名:tick
  • 源码定位:L22
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

代码

@OnlyIn(Dist.CLIENT)
public class DustPlumeParticle extends BaseAshSmokeParticle {
    private static final int COLOR_RGB24 = 12235202;
 
    protected DustPlumeParticle(ClientLevel level, double x, double y, double z, double xa, double ya, double za, float scale, SpriteSet sprites) {
        super(level, x, y, z, 0.7F, 0.6F, 0.7F, xa, ya + 0.15F, za, scale, sprites, 0.5F, 7, 0.5F, false);
        float colorShift = this.random.nextFloat() * 0.2F;
        this.rCol = ARGB.red(12235202) / 255.0F - colorShift;
        this.gCol = ARGB.green(12235202) / 255.0F - colorShift;
        this.bCol = ARGB.blue(12235202) / 255.0F - colorShift;
    }
 
    @Override
    public void tick() {
        this.gravity = 0.88F * this.gravity;
        this.friction = 0.92F * this.friction;
        super.tick();
    }
 
    @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 DustPlumeParticle(level, x, y, z, xAux, yAux, zAux, 1.0F, this.sprites);
        }
    }
}

引用的其他类