if(info.morphProgress <= 40)
{
if(info.prevModelInfo != null && info.morphProgress < 10)
{
RenderPlayer rend = (RenderPlayer)RenderManager.instance.getEntityRenderObject(mc.thePlayer);
ResourceLocation resourceLoc = ObfHelper.invokeGetEntityTexture(info.prevModelInfo.getRenderer(), info.prevModelInfo.getRenderer().getClass(), info.prevState.entInstance);
Morph.proxy.tickHandlerClient.renderHandInstance.progress = 1.0F;
Morph.proxy.tickHandlerClient.renderHandInstance.setParent(rend);
Morph.proxy.tickHandlerClient.renderHandInstance.resourceLoc = resourceLoc;
Morph.proxy.tickHandlerClient.renderHandInstance.replacement = info.prevModelInfo.assumedArm;
RenderManager.instance.entityRenderMap.put(mc.thePlayer.getClass(), Morph.proxy.tickHandlerClient.renderHandInstance);
mc.entityRenderer.renderHand(Morph.proxy.tickHandlerClient.renderTick, 0);
if(info.getMorphing())
{
float progress = ((float)info.morphProgress + Morph.proxy.tickHandlerClient.renderTick) / 10F;
Morph.proxy.tickHandlerClient.renderHandInstance.progress = progress;
String resourceDomain = resourceLoc.resourceDomain;
String resourcePath = resourceLoc.resourcePath;
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, "morph", ObfHelper.resourceDomain);
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, "textures/skin/morphskin.png", ObfHelper.resourcePath);
mc.entityRenderer.renderHand(Morph.proxy.tickHandlerClient.renderTick, 0);
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, resourceDomain, ObfHelper.resourceDomain);
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, resourcePath, ObfHelper.resourcePath);
}
RenderManager.instance.entityRenderMap.put(mc.thePlayer.getClass(), rend);
}
}
else
{
if(info.nextModelInfo != null && info.morphProgress >= 70)
{
RenderPlayer rend = (RenderPlayer)RenderManager.instance.getEntityRenderObject(mc.thePlayer);
ResourceLocation resourceLoc = ObfHelper.invokeGetEntityTexture(info.nextModelInfo.getRenderer(), info.nextModelInfo.getRenderer().getClass(), info.nextState.entInstance);
Morph.proxy.tickHandlerClient.renderHandInstance.progress = 1.0F;
Morph.proxy.tickHandlerClient.renderHandInstance.setParent(rend);
Morph.proxy.tickHandlerClient.renderHandInstance.resourceLoc = resourceLoc;
Morph.proxy.tickHandlerClient.renderHandInstance.replacement = info.nextModelInfo.assumedArm;
RenderManager.instance.entityRenderMap.put(mc.thePlayer.getClass(), Morph.proxy.tickHandlerClient.renderHandInstance);
mc.entityRenderer.renderHand(Morph.proxy.tickHandlerClient.renderTick, 0);
if(info.getMorphing())
{
float progress = ((float)info.morphProgress - 70 + Morph.proxy.tickHandlerClient.renderTick) / 10F;
if(progress > 1.0F)
{
progress = 1.0F;
}
Morph.proxy.tickHandlerClient.renderHandInstance.progress = 1.0F - progress;
String resourceDomain = resourceLoc.resourceDomain;
String resourcePath = resourceLoc.resourcePath;
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, "morph", ObfHelper.resourceDomain);
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, "textures/skin/morphskin.png", ObfHelper.resourcePath);
mc.entityRenderer.renderHand(Morph.proxy.tickHandlerClient.renderTick, 0);
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, resourceDomain, ObfHelper.resourceDomain);
ReflectionHelper.setPrivateValue(ResourceLocation.class, resourceLoc, resourcePath, ObfHelper.resourcePath);
}
RenderManager.instance.entityRenderMap.put(mc.thePlayer.getClass(), rend);
}
}
if(info.prevModelInfo != null && info.nextModelInfo != null && info.morphProgress >= 10 && info.morphProgress < 70)
{
RenderPlayer rend = (RenderPlayer)RenderManager.instance.getEntityRenderObject(mc.thePlayer);
ResourceLocation resourceLoc = RenderMorph.morphSkin;
Morph.proxy.tickHandlerClient.renderHandInstance.progress = 1.0F;
Morph.proxy.tickHandlerClient.renderHandInstance.setParent(rend);