本文整理汇总了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();
}