    001    package net.minecraft.client.particle;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import net.minecraft.client.renderer.Tessellator;
    006    import net.minecraft.world.World;
    007
    008    @SideOnly(Side.CLIENT)
    009    public class EntityHugeExplodeFX extends EntityFX
    010    {
    011        private int timeSinceStart = 0;
    012
    013        /** the maximum time for the explosion */
    014        private int maximumTime = 0;
    015
    016        public EntityHugeExplodeFX(World par1World, double par2, double par4, double par6, double par8, double par10, double par12)
    017        {
    018            super(par1World, par2, par4, par6, 0.0D, 0.0D, 0.0D);
    019            this.maximumTime = 8;
    020        }
    021
    022        public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7) {}
    023
    024        /**
    025         * Called to update the entity's position/logic.
    026         */
    027        public void onUpdate()
    028        {
    029            for (int var1 = 0; var1 < 6; ++var1)
    030            {
    031                double var2 = this.posX + (this.rand.nextDouble() - this.rand.nextDouble()) * 4.0D;
    032                double var4 = this.posY + (this.rand.nextDouble() - this.rand.nextDouble()) * 4.0D;
    033                double var6 = this.posZ + (this.rand.nextDouble() - this.rand.nextDouble()) * 4.0D;
    034                this.worldObj.spawnParticle("largeexplode", var2, var4, var6, (double)((float)this.timeSinceStart / (float)this.maximumTime), 0.0D, 0.0D);
    035            }
    036
    037            ++this.timeSinceStart;
    038
    039            if (this.timeSinceStart == this.maximumTime)
    040            {
    041                this.setDead();
    042            }
    043        }
    044
    045        public int getFXLayer()
    046        {
    047            return 1;
    048        }
    049    }