You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			70 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			Java
		
	
			
		
		
	
	
			70 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			Java
		
	
package net.minecraft.client.particle;
 | 
						|
 | 
						|
import cpw.mods.fml.relauncher.Side;
 | 
						|
import cpw.mods.fml.relauncher.SideOnly;
 | 
						|
import net.minecraft.client.renderer.Tessellator;
 | 
						|
import net.minecraft.init.Blocks;
 | 
						|
import net.minecraft.item.Item;
 | 
						|
import net.minecraft.world.World;
 | 
						|
 | 
						|
@SideOnly(Side.CLIENT)
 | 
						|
public class EntityBreakingFX extends EntityFX
 | 
						|
{
 | 
						|
    private static final String __OBFID = "CL_00000897";
 | 
						|
 | 
						|
    public EntityBreakingFX(World p_i1195_1_, double p_i1195_2_, double p_i1195_4_, double p_i1195_6_, Item p_i1195_8_)
 | 
						|
    {
 | 
						|
        this(p_i1195_1_, p_i1195_2_, p_i1195_4_, p_i1195_6_, p_i1195_8_, 0);
 | 
						|
    }
 | 
						|
 | 
						|
    public EntityBreakingFX(World p_i1196_1_, double p_i1196_2_, double p_i1196_4_, double p_i1196_6_, Item p_i1196_8_, int p_i1196_9_)
 | 
						|
    {
 | 
						|
        super(p_i1196_1_, p_i1196_2_, p_i1196_4_, p_i1196_6_, 0.0D, 0.0D, 0.0D);
 | 
						|
        this.setParticleIcon(p_i1196_8_.getIconFromDamage(p_i1196_9_));
 | 
						|
        this.particleRed = this.particleGreen = this.particleBlue = 1.0F;
 | 
						|
        this.particleGravity = Blocks.snow.blockParticleGravity;
 | 
						|
        this.particleScale /= 2.0F;
 | 
						|
    }
 | 
						|
 | 
						|
    public EntityBreakingFX(World p_i1197_1_, double p_i1197_2_, double p_i1197_4_, double p_i1197_6_, double p_i1197_8_, double p_i1197_10_, double p_i1197_12_, Item p_i1197_14_, int p_i1197_15_)
 | 
						|
    {
 | 
						|
        this(p_i1197_1_, p_i1197_2_, p_i1197_4_, p_i1197_6_, p_i1197_14_, p_i1197_15_);
 | 
						|
        this.motionX *= 0.10000000149011612D;
 | 
						|
        this.motionY *= 0.10000000149011612D;
 | 
						|
        this.motionZ *= 0.10000000149011612D;
 | 
						|
        this.motionX += p_i1197_8_;
 | 
						|
        this.motionY += p_i1197_10_;
 | 
						|
        this.motionZ += p_i1197_12_;
 | 
						|
    }
 | 
						|
 | 
						|
    public int getFXLayer()
 | 
						|
    {
 | 
						|
        return 2;
 | 
						|
    }
 | 
						|
 | 
						|
    public void renderParticle(Tessellator p_70539_1_, float p_70539_2_, float p_70539_3_, float p_70539_4_, float p_70539_5_, float p_70539_6_, float p_70539_7_)
 | 
						|
    {
 | 
						|
        float f6 = ((float)this.particleTextureIndexX + this.particleTextureJitterX / 4.0F) / 16.0F;
 | 
						|
        float f7 = f6 + 0.015609375F;
 | 
						|
        float f8 = ((float)this.particleTextureIndexY + this.particleTextureJitterY / 4.0F) / 16.0F;
 | 
						|
        float f9 = f8 + 0.015609375F;
 | 
						|
        float f10 = 0.1F * this.particleScale;
 | 
						|
 | 
						|
        if (this.particleIcon != null)
 | 
						|
        {
 | 
						|
            f6 = this.particleIcon.getInterpolatedU((double)(this.particleTextureJitterX / 4.0F * 16.0F));
 | 
						|
            f7 = this.particleIcon.getInterpolatedU((double)((this.particleTextureJitterX + 1.0F) / 4.0F * 16.0F));
 | 
						|
            f8 = this.particleIcon.getInterpolatedV((double)(this.particleTextureJitterY / 4.0F * 16.0F));
 | 
						|
            f9 = this.particleIcon.getInterpolatedV((double)((this.particleTextureJitterY + 1.0F) / 4.0F * 16.0F));
 | 
						|
        }
 | 
						|
 | 
						|
        float f11 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)p_70539_2_ - interpPosX);
 | 
						|
        float f12 = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)p_70539_2_ - interpPosY);
 | 
						|
        float f13 = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)p_70539_2_ - interpPosZ);
 | 
						|
        p_70539_1_.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue);
 | 
						|
        p_70539_1_.addVertexWithUV((double)(f11 - p_70539_3_ * f10 - p_70539_6_ * f10), (double)(f12 - p_70539_4_ * f10), (double)(f13 - p_70539_5_ * f10 - p_70539_7_ * f10), (double)f6, (double)f9);
 | 
						|
        p_70539_1_.addVertexWithUV((double)(f11 - p_70539_3_ * f10 + p_70539_6_ * f10), (double)(f12 + p_70539_4_ * f10), (double)(f13 - p_70539_5_ * f10 + p_70539_7_ * f10), (double)f6, (double)f8);
 | 
						|
        p_70539_1_.addVertexWithUV((double)(f11 + p_70539_3_ * f10 + p_70539_6_ * f10), (double)(f12 + p_70539_4_ * f10), (double)(f13 + p_70539_5_ * f10 + p_70539_7_ * f10), (double)f7, (double)f8);
 | 
						|
        p_70539_1_.addVertexWithUV((double)(f11 + p_70539_3_ * f10 - p_70539_6_ * f10), (double)(f12 - p_70539_4_ * f10), (double)(f13 + p_70539_5_ * f10 - p_70539_7_ * f10), (double)f7, (double)f9);
 | 
						|
    }
 | 
						|
} |