RisingParticle.java

net.minecraft.client.particle.RisingParticle

信息

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

    TODO

字段/常量

内部类/嵌套类型

构造器

protected RisingParticle(ClientLevel level, double x, double y, double z, double xd, double yd, double zd, TextureAtlasSprite sprite) @ L10

  • 构造器名:RisingParticle
  • 源码定位:L10
  • 修饰符:protected

参数:

  • level: ClientLevel
  • x: double
  • y: double
  • z: double
  • xd: double
  • yd: double
  • zd: double
  • sprite: TextureAtlasSprite

说明:

TODO

方法

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

代码

@OnlyIn(Dist.CLIENT)
public abstract class RisingParticle extends SingleQuadParticle {
    protected RisingParticle(ClientLevel level, double x, double y, double z, double xd, double yd, double zd, TextureAtlasSprite sprite) {
        super(level, x, y, z, xd, yd, zd, sprite);
        this.friction = 0.96F;
        this.xd = this.xd * 0.01F + xd;
        this.yd = this.yd * 0.01F + yd;
        this.zd = this.zd * 0.01F + zd;
        this.x = this.x + (this.random.nextFloat() - this.random.nextFloat()) * 0.05F;
        this.y = this.y + (this.random.nextFloat() - this.random.nextFloat()) * 0.05F;
        this.z = this.z + (this.random.nextFloat() - this.random.nextFloat()) * 0.05F;
        this.lifetime = (int)(8.0 / (this.random.nextFloat() * 0.8 + 0.2)) + 4;
    }
}

引用的其他类