本文整理匯總了Java中net.minecraft.client.particle.EntityFX.interpPosX方法的典型用法代碼示例。如果您正苦於以下問題:Java EntityFX.interpPosX方法的具體用法?Java EntityFX.interpPosX怎麽用?Java EntityFX.interpPosX使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.client.particle.EntityFX
的用法示例。
在下文中一共展示了EntityFX.interpPosX方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: renderParticle
import net.minecraft.client.particle.EntityFX; //導入方法依賴的package包/類
@Override
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
{
GL11.glPushMatrix();
GL11.glDepthMask(false);
GL11.glDisable(GL11.GL_DEPTH_TEST);
float var8 = (this.particleAge + par2) / this.particleMaxAge * 32.0F;
if (var8 < 0.0F)
{
var8 = 0.0F;
}
if (var8 > 1.0F)
{
var8 = 1.0F;
}
this.particleScale = this.smokeParticleScale * var8;
float f6 = this.particleTextureIndexX / 16.0F;
float f7 = f6 + 0.0624375F;
float f8 = this.particleTextureIndexY / 16.0F;
float f9 = f8 + 0.0624375F;
final float f10 = 0.1F * this.particleScale;
if (this.particleIcon != null)
{
f6 = this.particleIcon.getMinU();
f7 = this.particleIcon.getMaxU();
f8 = this.particleIcon.getMinV();
f9 = this.particleIcon.getMaxV();
}
final float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - EntityFX.interpPosX);
final float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - EntityFX.interpPosY);
final float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - EntityFX.interpPosZ);
final float f14 = 1.0F;
par1Tessellator.setColorRGBA_F(this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha);
par1Tessellator.addVertexWithUV(f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10, f7, f9);
par1Tessellator.addVertexWithUV(f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10, f7, f8);
par1Tessellator.addVertexWithUV(f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10, f6, f8);
par1Tessellator.addVertexWithUV(f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10, f6, f9);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(true);
GL11.glPopMatrix();
}