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