Package net.minecraft.client.renderer.entity

Examples of net.minecraft.client.renderer.entity.RenderPlayer


        GL11.glRotatef(200.0F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(1.0F, 1.0F, 1.0F);
        GL11.glTranslatef(5.6F, 0.0F, 0.0F);
        Render render = RenderManager.instance.getEntityRenderObject(mc.thePlayer);
        RenderPlayer renderplayer = (RenderPlayer) render;
        renderplayer.renderFirstPersonArm(mc.thePlayer);
        GL11.glPopMatrix();
    }
View Full Code Here


                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);
View Full Code Here

                    {
                        if(e.getValue().nextState.entInstance instanceof EntityPlayer && !((EntityPlayer)e.getValue().nextState.entInstance).getCommandSenderName().equals(e.getKey()))
                        {
                            event.setCanceled(true);
                        }
                        RenderPlayer rend = (RenderPlayer)RenderManager.instance.getEntityRenderObject(player);

                        GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);

                        if(Minecraft.isGuiEnabled() && player != Minecraft.getMinecraft().thePlayer && !player.isInvisibleToPlayer(Minecraft.getMinecraft().thePlayer) && player.riddenByEntity == null)
                        {
                            float f = 1.6F;
                            float f1 = 0.016666668F * f;
                            double d3 = player.getDistanceSqToEntity(Minecraft.getMinecraft().thePlayer);
                            float f2 = player.isSneaking() ? RendererLivingEntity.NAME_TAG_RANGE_SNEAK : RendererLivingEntity.NAME_TAG_RANGE;

                            if(d3 < (double)(f2 * f2))
                            {
                                String s = player.func_145748_c_().getFormattedText();
                                rend.func_96449_a(player, event.x, event.y, event.z, s, f1, d3);
                            }
                        }
                    }
                }
                break;
View Full Code Here

  //private static final ResourceLocation zombieSkin = new ResourceLocation("flansmod", "skins/zombie.png");
     
  @SubscribeEvent
  public void renderOffHandGun(RenderPlayerEvent.Specials.Post event)
  {
    RenderPlayer renderer = event.renderer;
    EntityPlayer player = event.entityPlayer;
    float dt = event.partialRenderTick;
    PlayerData data = PlayerHandler.getPlayerData(player, Side.CLIENT);
   
    ItemStack gunStack = null;
View Full Code Here

    @SideOnly(Side.CLIENT)
    public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot){
        if(armorSlot == 0 && (Config.useHelmetModel || DateEventHandler.isIronManEvent())) {
            RenderItemPneumaticHelmet.INSTANCE.render(entityLiving);

            RenderPlayer render = (RenderPlayer)RenderManager.instance.entityRenderMap.get(EntityPlayer.class);
            ModelBiped model = armorSlot == 2 ? render.modelArmor : render.modelArmorChestplate;
            model.bipedHead.showModel = false;
            return model;
        }
        return null;
View Full Code Here

TOP

Related Classes of net.minecraft.client.renderer.entity.RenderPlayer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.