/**
* Renders the particle
*/
public void renderParticle(VertexBuffer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ)
{
float f = ((float)this.footstepAge + partialTicks) / (float)this.footstepMaxAge;
f = f * f;
float f1 = 2.0F - f * 2.0F;
if (f1 > 1.0F)
{
f1 = 1.0F;
}
f1 = f1 * 0.2F;
GlStateManager.disableLighting();
float f2 = 0.125F;
float f3 = (float)(this.posX - interpPosX);
float f4 = (float)(this.posY - interpPosY);
float f5 = (float)(this.posZ - interpPosZ);
float f6 = this.worldObj.getLightBrightness(new BlockPos(this.posX, this.posY, this.posZ));
this.currentFootSteps.bindTexture(FOOTPRINT_TEXTURE);
GlStateManager.enableBlend();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
worldRendererIn.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldRendererIn.pos((double)(f3 - 0.125F), (double)f4, (double)(f5 + 0.125F)).tex(0.0D, 1.0D).color(f6, f6, f6, f1).endVertex();
worldRendererIn.pos((double)(f3 + 0.125F), (double)f4, (double)(f5 + 0.125F)).tex(1.0D, 1.0D).color(f6, f6, f6, f1).endVertex();
worldRendererIn.pos((double)(f3 + 0.125F), (double)f4, (double)(f5 - 0.125F)).tex(1.0D, 0.0D).color(f6, f6, f6, f1).endVertex();
worldRendererIn.pos((double)(f3 - 0.125F), (double)f4, (double)(f5 - 0.125F)).tex(0.0D, 0.0D).color(f6, f6, f6, f1).endVertex();
Tessellator.getInstance().draw();
GlStateManager.disableBlend();
GlStateManager.enableLighting();
}
ParticleFootStep.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:CustomWorldGen
作者:
评论列表
文章目录