/**
* Caches the current frame's active render info, including the current World, RenderEngine, GameSettings and
* FontRenderer settings, as well as interpolated player position, pitch and yaw.
*/
public void cacheActiveRenderInfo(World par1World, RenderEngine par2RenderEngine, FontRenderer par3FontRenderer, EntityLiving par4EntityLiving, EntityLiving par5EntityLiving, GameSettings par6GameSettings, float par7)
{
this.worldObj = par1World;
this.renderEngine = par2RenderEngine;
this.options = par6GameSettings;
this.livingPlayer = par4EntityLiving;
this.field_96451_i = par5EntityLiving;
this.fontRenderer = par3FontRenderer;
if (par4EntityLiving.isPlayerSleeping())
{
int x = MathHelper.floor_double(par4EntityLiving.posX);
int y = MathHelper.floor_double(par4EntityLiving.posY);
int z = MathHelper.floor_double(par4EntityLiving.posZ);
Block block = Block.blocksList[par1World.getBlockId(x, y, z)];
if (block != null && block.isBed(par1World, x, y, z, par4EntityLiving))
{
int k = block.getBedDirection(par1World, x, y, z);;
this.playerViewY = (float)(k * 90 + 180);
this.playerViewX = 0.0F;
}
}
else
{
this.playerViewY = par4EntityLiving.prevRotationYaw + (par4EntityLiving.rotationYaw - par4EntityLiving.prevRotationYaw) * par7;
this.playerViewX = par4EntityLiving.prevRotationPitch + (par4EntityLiving.rotationPitch - par4EntityLiving.prevRotationPitch) * par7;
}
if (par6GameSettings.thirdPersonView == 2)
{
this.playerViewY += 180.0F;
}
this.viewerPosX = par4EntityLiving.lastTickPosX + (par4EntityLiving.posX - par4EntityLiving.lastTickPosX) * (double)par7;
this.viewerPosY = par4EntityLiving.lastTickPosY + (par4EntityLiving.posY - par4EntityLiving.lastTickPosY) * (double)par7;
this.viewerPosZ = par4EntityLiving.lastTickPosZ + (par4EntityLiving.posZ - par4EntityLiving.lastTickPosZ) * (double)par7;
}
RenderManager.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:Veniocraft
作者:
评论列表
文章目录