EntityAuraFX .java

net.minecraft.client.particle.EntityAuraFX (class, 62 lines): extends EntityFX. members: HappyVillagerFactory, Factory, onUpdate. imports: World.

net.minecraft.client.particleclass62 linesclientextends EntityFX2.2 KB

API Surface (3)

void onUpdate()
EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)

Code Graph: Dependencies (3)

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

Full Source

EntityAuraFX.java62 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.particle;
2
3
import net.minecraft.world.World;
4
5
public class EntityAuraFX extends EntityFX
6
{
7
    protected EntityAuraFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double speedIn)
8
    {
9
        super(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, speedIn);
10
        float f = this.rand.nextFloat() * 0.1F + 0.2F;
11
        this.particleRed = f;
12
        this.particleGreen = f;
13
        this.particleBlue = f;
14
        this.setParticleTextureIndex(0);
15
        this.setSize(0.02F, 0.02F);
16
        this.particleScale *= this.rand.nextFloat() * 0.6F + 0.5F;
17
        this.motionX *= 0.019999999552965164D;
18
        this.motionY *= 0.019999999552965164D;
19
        this.motionZ *= 0.019999999552965164D;
20
        this.particleMaxAge = (int)(20.0D / (Math.random() * 0.8D + 0.2D));
21
        this.noClip = true;
22
    }
23
24
    /**
25
     * Called to update the entity's position/logic.
26
     */
27
    public void onUpdate()
28
    {
29
        this.prevPosX = this.posX;
30
        this.prevPosY = this.posY;
31
        this.prevPosZ = this.posZ;
32
        this.moveEntity(this.motionX, this.motionY, this.motionZ);
33
        this.motionX *= 0.99D;
34
        this.motionY *= 0.99D;
35
        this.motionZ *= 0.99D;
36
37
        if (this.particleMaxAge-- <= 0)
38
        {
39
            this.setDead();
40
        }
41
    }
42
43
    public static class Factory implements IParticleFactory
44
    {
45
        public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
46
        {
47
            return new EntityAuraFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
48
        }
49
    }
50
51
    public static class HappyVillagerFactory implements IParticleFactory
52
    {
53
        public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
54
        {
55
            EntityFX entityfx = new EntityAuraFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
56
            entityfx.setParticleTextureIndex(82);
57
            entityfx.setRBGColorF(1.0F, 1.0F, 1.0F);
58
            return entityfx;
59
        }
60
    }
61
}
62

Deobfuscated MCP 1.8.9 source of EntityAuraFX from Marcelektro/MavenMCP-1.8.9 (net/minecraft/client/particle/EntityAuraFX.java), stored verbatim.