    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 EntitySuspendFX extends EntityFX
    008    {
    009        public EntitySuspendFX(World par1World, double par2, double par4, double par6, double par8, double par10, double par12)
    010        {
    011            super(par1World, par2, par4 - 0.125D, par6, par8, par10, par12);
    012            this.particleRed = 0.4F;
    013            this.particleGreen = 0.4F;
    014            this.particleBlue = 0.7F;
    015            this.setParticleTextureIndex(0);
    016            this.setSize(0.01F, 0.01F);
    017            this.particleScale *= this.rand.nextFloat() * 0.6F + 0.2F;
    018            this.motionX = par8 * 0.0D;
    019            this.motionY = par10 * 0.0D;
    020            this.motionZ = par12 * 0.0D;
    021            this.particleMaxAge = (int)(16.0D / (Math.random() * 0.8D + 0.2D));
    022        }
    023
    024        /**
    025         * Called to update the entity's position/logic.
    026         */
    027        public void onUpdate()
    028        {
    029            this.prevPosX = this.posX;
    030            this.prevPosY = this.posY;
    031            this.prevPosZ = this.posZ;
    032            this.moveEntity(this.motionX, this.motionY, this.motionZ);
    033
    034            if (this.worldObj.getBlockMaterial(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)) != Material.water)
    035            {
    036                this.setDead();
    037            }
    038
    039            if (this.particleMaxAge-- <= 0)
    040            {
    041                this.setDead();
    042            }
    043        }
    044    }