EntityHugeExplodeFX .java

net.minecraft.client.particle.EntityHugeExplodeFX (class, 61 lines): members: timeSinceStart, maximumTime, getFXLayer, renderParticle, Factory, onUpdate.

net.minecraft.client.particleclass61 linesclientextends EntityFX2.0 KB

API Surface (4)

void renderParticle(WorldRenderer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ)
void onUpdate()
int getFXLayer()
EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)

Fields & Constants (2)

timeSinceStart
maximumTime

Code Graph: Dependencies (6)

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

Full Source

EntityHugeExplodeFX.java61 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.particle;
2
3
import net.minecraft.client.renderer.WorldRenderer;
4
import net.minecraft.entity.Entity;
5
import net.minecraft.util.EnumParticleTypes;
6
import net.minecraft.world.World;
7
8
public class EntityHugeExplodeFX extends EntityFX
9
{
10
    private int timeSinceStart;
11
12
    /** the maximum time for the explosion */
13
    private int maximumTime = 8;
14
15
    protected EntityHugeExplodeFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double p_i1214_8_, double p_i1214_10_, double p_i1214_12_)
16
    {
17
        super(worldIn, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D);
18
    }
19
20
    /**
21
     * Renders the particle
22
     */
23
    public void renderParticle(WorldRenderer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ)
24
    {
25
    }
26
27
    /**
28
     * Called to update the entity's position/logic.
29
     */
30
    public void onUpdate()
31
    {
32
        for (int i = 0; i < 6; ++i)
33
        {
34
            double d0 = this.posX + (this.rand.nextDouble() - this.rand.nextDouble()) * 4.0D;
35
            double d1 = this.posY + (this.rand.nextDouble() - this.rand.nextDouble()) * 4.0D;
36
            double d2 = this.posZ + (this.rand.nextDouble() - this.rand.nextDouble()) * 4.0D;
37
            this.worldObj.spawnParticle(EnumParticleTypes.EXPLOSION_LARGE, d0, d1, d2, (double)((float)this.timeSinceStart / (float)this.maximumTime), 0.0D, 0.0D, new int[0]);
38
        }
39
40
        ++this.timeSinceStart;
41
42
        if (this.timeSinceStart == this.maximumTime)
43
        {
44
            this.setDead();
45
        }
46
    }
47
48
    public int getFXLayer()
49
    {
50
        return 1;
51
    }
52
53
    public static class Factory implements IParticleFactory
54
    {
55
        public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
56
        {
57
            return new EntityHugeExplodeFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
58
        }
59
    }
60
}
61

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