if((Minecraft.getMinecraft().currentScreen instanceof GuiInventory || Minecraft.getMinecraft().currentScreen instanceof GuiContainerCreative) && RenderManager.instance.playerViewY == 180.0F)
{
GL11.glScalef(prevScaleMag, prevScaleMag, prevScaleMag);
EntityLivingBase renderView = Minecraft.getMinecraft().renderViewEntity;
info.prevState.entInstance.renderYawOffset = renderView.renderYawOffset;
info.prevState.entInstance.rotationYaw = renderView.rotationYaw;
info.prevState.entInstance.rotationPitch = renderView.rotationPitch;
info.prevState.entInstance.prevRotationYawHead = renderView.prevRotationYawHead;
info.prevState.entInstance.rotationYawHead = renderView.rotationYawHead;
renderTick = 1.0F;
}
info.prevModelInfo.forceRender(info.prevState.entInstance, 0.0D, 0.0D - event.entityPlayer.yOffset, 0.0D, f1, renderTick);
if(info.getMorphing())
{
float progress = ((float)info.morphProgress + Morph.proxy.tickHandlerClient.renderTick) / 10F;
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1.0F, 1.0F, 1.0F, progress);
ResourceLocation resourceLoc = ObfHelper.invokeGetEntityTexture(info.prevModelInfo.getRenderer(), info.prevModelInfo.getRenderer().getClass(), info.prevState.entInstance);
String resourceDomain = ReflectionHelper.getPrivateValue(ResourceLocation.class, resourceLoc, ObfHelper.resourceDomain);
String resourcePath = ReflectionHelper.getPrivateValue(ResourceLocation.class, resourceLoc, ObfHelper.resourcePath);
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, "morph", ObfHelper.resourceDomain);
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, "textures/skin/morphskin.png", ObfHelper.resourcePath);
info.prevModelInfo.forceRender(info.prevState.entInstance, 0.0D, 0.0D - event.entityPlayer.yOffset, 0.0D, f1, renderTick);
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, resourceDomain, ObfHelper.resourceDomain);
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, resourcePath, ObfHelper.resourcePath);
GL11.glDisable(GL11.GL_BLEND);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
info.prevState.entInstance.renderYawOffset = ff2;
info.prevState.entInstance.rotationYaw = ff3;
info.prevState.entInstance.rotationPitch = ff4;
info.prevState.entInstance.prevRotationYawHead = ff5;
info.prevState.entInstance.rotationYawHead = ff6;
}
}
else
{
if(info.nextModelInfo != null && info.morphProgress >= 70)
{
float ff2 = info.nextState.entInstance.renderYawOffset;
float ff3 = info.nextState.entInstance.rotationYaw;
float ff4 = info.nextState.entInstance.rotationPitch;
float ff5 = info.nextState.entInstance.prevRotationYawHead;
float ff6 = info.nextState.entInstance.rotationYawHead;
if((Minecraft.getMinecraft().currentScreen instanceof GuiInventory || Minecraft.getMinecraft().currentScreen instanceof GuiContainerCreative) && RenderManager.instance.playerViewY == 180.0F)
{
GL11.glScalef(nextScaleMag, nextScaleMag, nextScaleMag);
EntityLivingBase renderView = Minecraft.getMinecraft().renderViewEntity;
info.nextState.entInstance.prevRenderYawOffset = info.nextState.entInstance.renderYawOffset = renderView.renderYawOffset;
info.nextState.entInstance.rotationYaw = renderView.rotationYaw;
info.nextState.entInstance.rotationPitch = renderView.rotationPitch;
info.nextState.entInstance.prevRotationYawHead = renderView.prevRotationYawHead;
info.nextState.entInstance.rotationYawHead = renderView.rotationYawHead;
renderTick = 1.0F;
}
info.nextModelInfo.forceRender(info.nextState.entInstance, 0.0D, 0.0D - event.entityPlayer.yOffset, 0.0D, f1, renderTick);
if(info.getMorphing())
{
float progress = ((float)info.morphProgress - 70 + Morph.proxy.tickHandlerClient.renderTick) / 10F;
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
if(progress > 1.0F)
{
progress = 1.0F;
}
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F - progress);
ResourceLocation resourceLoc = ObfHelper.invokeGetEntityTexture(info.nextModelInfo.getRenderer(), info.nextModelInfo.getRenderer().getClass(), info.nextState.entInstance);
String resourceDomain = ReflectionHelper.getPrivateValue(ResourceLocation.class, resourceLoc, ObfHelper.resourceDomain);
String resourcePath = ReflectionHelper.getPrivateValue(ResourceLocation.class, resourceLoc, ObfHelper.resourcePath);
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, "morph", ObfHelper.resourceDomain);
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, "textures/skin/morphskin.png", ObfHelper.resourcePath);
info.nextModelInfo.forceRender(info.nextState.entInstance, 0.0D, 0.0D - event.entityPlayer.yOffset, 0.0D, f1, renderTick);
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, resourceDomain, ObfHelper.resourceDomain);
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, resourcePath, ObfHelper.resourcePath);
GL11.glDisable(GL11.GL_BLEND);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
info.nextState.entInstance.renderYawOffset = ff2;
info.nextState.entInstance.rotationYaw = ff3;
info.nextState.entInstance.rotationPitch = ff4;
info.nextState.entInstance.prevRotationYawHead = ff5;
info.nextState.entInstance.rotationYawHead = ff6;
}
}
if(info.prevModelInfo != null && info.nextModelInfo != null && info.morphProgress >= 10 && info.morphProgress < 70)
{
float progress = ((float)info.morphProgress - 10F + Morph.proxy.tickHandlerClient.renderTick) / 60F;
float ff2 = info.prevState.entInstance.renderYawOffset;
float ff3 = info.prevState.entInstance.rotationYaw;
float ff4 = info.prevState.entInstance.rotationPitch;
float ff5 = info.prevState.entInstance.prevRotationYawHead;
float ff6 = info.prevState.entInstance.rotationYawHead;
float fff2 = info.nextState.entInstance.renderYawOffset;
float fff3 = info.nextState.entInstance.rotationYaw;
float fff4 = info.nextState.entInstance.rotationPitch;
float fff5 = info.nextState.entInstance.prevRotationYawHead;
float fff6 = info.nextState.entInstance.rotationYawHead;
if((Minecraft.getMinecraft().currentScreen instanceof GuiInventory || Minecraft.getMinecraft().currentScreen instanceof GuiContainerCreative) && RenderManager.instance.playerViewY == 180.0F)
{
GL11.glScalef(prevScaleMag + (nextScaleMag - prevScaleMag) * progress, prevScaleMag + (nextScaleMag - prevScaleMag) * progress, prevScaleMag + (nextScaleMag - prevScaleMag) * progress);
EntityLivingBase renderView = Minecraft.getMinecraft().renderViewEntity;
info.nextState.entInstance.renderYawOffset = info.prevState.entInstance.renderYawOffset = renderView.renderYawOffset;
info.nextState.entInstance.rotationYaw = info.prevState.entInstance.rotationYaw = renderView.rotationYaw;
info.nextState.entInstance.rotationPitch = info.prevState.entInstance.rotationPitch = renderView.rotationPitch;
info.nextState.entInstance.prevRotationYawHead = info.prevState.entInstance.prevRotationYawHead = renderView.prevRotationYawHead;