/**
* Renders the desired {@code T} type Entity.
*/
public void doRender(EntityEnderCrystal entity, double x, double y, double z, float entityYaw, float partialTicks)
{
float f = (float)entity.innerRotation + partialTicks;
GlStateManager.pushMatrix();
GlStateManager.translate((float)x, (float)y, (float)z);
this.bindTexture(ENDER_CRYSTAL_TEXTURES);
float f1 = MathHelper.sin(f * 0.2F) / 2.0F + 0.5F;
f1 = f1 * f1 + f1;
if (this.renderOutlines)
{
GlStateManager.enableColorMaterial();
GlStateManager.enableOutlineMode(this.getTeamColor(entity));
}
if (entity.shouldShowBottom())
{
this.modelEnderCrystal.render(entity, 0.0F, f * 3.0F, f1 * 0.2F, 0.0F, 0.0F, 0.0625F);
}
else
{
this.modelEnderCrystalNoBase.render(entity, 0.0F, f * 3.0F, f1 * 0.2F, 0.0F, 0.0F, 0.0625F);
}
if (this.renderOutlines)
{
GlStateManager.disableOutlineMode();
GlStateManager.disableColorMaterial();
}
GlStateManager.popMatrix();
BlockPos blockpos = entity.getBeamTarget();
if (blockpos != null)
{
this.bindTexture(RenderDragon.ENDERCRYSTAL_BEAM_TEXTURES);
float f2 = (float)blockpos.getX() + 0.5F;
float f3 = (float)blockpos.getY() + 0.5F;
float f4 = (float)blockpos.getZ() + 0.5F;
double d0 = (double)f2 - entity.posX;
double d1 = (double)f3 - entity.posY;
double d2 = (double)f4 - entity.posZ;
RenderDragon.renderCrystalBeams(x + d0, y - 0.3D + (double)(f1 * 0.4F) + d1, z + d2, partialTicks, (double)f2, (double)f3, (double)f4, entity.innerRotation, entity.posX, entity.posY, entity.posZ);
}
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
RenderEnderCrystal.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:Backmemed
作者:
评论列表
文章目录