Java 类net.minecraft.client.renderer.entity.RenderPlayer 实例源码

项目:Etheric    文件:SeeingStoneHandler.java   
private static void renderArm(EnumHandSide p_187455_1_) {
    Minecraft mc = Minecraft.getMinecraft();

    mc.getTextureManager().bindTexture(mc.player.getLocationSkin());
    Render<AbstractClientPlayer> render = mc.getRenderManager()
            .<AbstractClientPlayer>getEntityRenderObject(mc.player);
    RenderPlayer renderplayer = (RenderPlayer) render;
    GlStateManager.pushMatrix();
    float f = p_187455_1_ == EnumHandSide.RIGHT ? 1.0F : -1.0F;
    GlStateManager.rotate(92.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(45.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(f * -41.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.translate(f * 0.3F, -1.1F, 0.45F);

    if (p_187455_1_ == EnumHandSide.RIGHT) {
        renderplayer.renderRightArm(mc.player);
    } else {
        renderplayer.renderLeftArm(mc.player);
    }

    GlStateManager.popMatrix();
}
项目:ToolBelt    文件:ClientProxy.java   
@Override
public void init()
{
    ClientRegistry.registerKeyBinding(keyOpenToolMenu =
            new KeyBinding("key.toolbelt.open", Keyboard.KEY_R, "key.toolbelt.category"));
    //keyOpenToolMenu.

    ClientRegistry.registerKeyBinding(keyCycleToolMenuL =
            new KeyBinding("key.toolbelt.cycle.left", 0, "key.toolbelt.category"));

    ClientRegistry.registerKeyBinding(keyCycleToolMenuR =
            new KeyBinding("key.toolbelt.cycle.right", 0, "key.toolbelt.category"));

    Map<String, RenderPlayer> skinMap = Minecraft.getMinecraft().getRenderManager().getSkinMap();

    RenderPlayer render = skinMap.get("default");
    render.addLayer(new LayerToolBelt(render));

    render = skinMap.get("slim");
    render.addLayer(new LayerToolBelt(render));
}
项目:DecompiledMinecraft    文件:ItemRenderer.java   
private void func_178095_a(AbstractClientPlayer clientPlayer, float p_178095_2_, float p_178095_3_)
{
    float f = -0.3F * MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI);
    float f1 = 0.4F * MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI * 2.0F);
    float f2 = -0.4F * MathHelper.sin(p_178095_3_ * (float)Math.PI);
    GlStateManager.translate(f, f1, f2);
    GlStateManager.translate(0.64000005F, -0.6F, -0.71999997F);
    GlStateManager.translate(0.0F, p_178095_2_ * -0.6F, 0.0F);
    GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
    float f3 = MathHelper.sin(p_178095_3_ * p_178095_3_ * (float)Math.PI);
    float f4 = MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI);
    GlStateManager.rotate(f4 * 70.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(f3 * -20.0F, 0.0F, 0.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(clientPlayer.getLocationSkin());
    GlStateManager.translate(-1.0F, 3.6F, 3.5F);
    GlStateManager.rotate(120.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.rotate(200.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(-135.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.scale(1.0F, 1.0F, 1.0F);
    GlStateManager.translate(5.6F, 0.0F, 0.0F);
    Render<AbstractClientPlayer> render = this.renderManager.<AbstractClientPlayer>getEntityRenderObject(this.mc.thePlayer);
    GlStateManager.disableCull();
    RenderPlayer renderplayer = (RenderPlayer)render;
    renderplayer.renderRightArm(this.mc.thePlayer);
    GlStateManager.enableCull();
}
项目:BaseClient    文件:PlayerItemsLayer.java   
public static void register(Map p_register_0_)
{
    Set set = p_register_0_.keySet();
    boolean flag = false;

    for (Object object : set)
    {
        Object object1 = p_register_0_.get(object);

        if (object1 instanceof RenderPlayer)
        {
            RenderPlayer renderplayer = (RenderPlayer)object1;
            renderplayer.addLayer(new PlayerItemsLayer(renderplayer));
            flag = true;
        }
    }

    if (!flag)
    {
        Config.warn("PlayerItemsLayer not registered");
    }
}
项目:BaseClient    文件:ItemRenderer.java   
private void func_178095_a(AbstractClientPlayer clientPlayer, float p_178095_2_, float p_178095_3_)
{
    float f = -0.3F * MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI);
    float f1 = 0.4F * MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI * 2.0F);
    float f2 = -0.4F * MathHelper.sin(p_178095_3_ * (float)Math.PI);
    GlStateManager.translate(f, f1, f2);
    GlStateManager.translate(0.64000005F, -0.6F, -0.71999997F);
    GlStateManager.translate(0.0F, p_178095_2_ * -0.6F, 0.0F);
    GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
    float f3 = MathHelper.sin(p_178095_3_ * p_178095_3_ * (float)Math.PI);
    float f4 = MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI);
    GlStateManager.rotate(f4 * 70.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(f3 * -20.0F, 0.0F, 0.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(clientPlayer.getLocationSkin());
    GlStateManager.translate(-1.0F, 3.6F, 3.5F);
    GlStateManager.rotate(120.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.rotate(200.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(-135.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.scale(1.0F, 1.0F, 1.0F);
    GlStateManager.translate(5.6F, 0.0F, 0.0F);
    Render render = this.renderManager.getEntityRenderObject(this.mc.thePlayer);
    GlStateManager.disableCull();
    RenderPlayer renderplayer = (RenderPlayer)render;
    renderplayer.renderRightArm(this.mc.thePlayer);
    GlStateManager.enableCull();
}
项目:BaseClient    文件:ItemRenderer.java   
private void func_178095_a(AbstractClientPlayer clientPlayer, float p_178095_2_, float p_178095_3_)
{
    float f = -0.3F * MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI);
    float f1 = 0.4F * MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI * 2.0F);
    float f2 = -0.4F * MathHelper.sin(p_178095_3_ * (float)Math.PI);
    GlStateManager.translate(f, f1, f2);
    GlStateManager.translate(0.64000005F, -0.6F, -0.71999997F);
    GlStateManager.translate(0.0F, p_178095_2_ * -0.6F, 0.0F);
    GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
    float f3 = MathHelper.sin(p_178095_3_ * p_178095_3_ * (float)Math.PI);
    float f4 = MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI);
    GlStateManager.rotate(f4 * 70.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(f3 * -20.0F, 0.0F, 0.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(clientPlayer.getLocationSkin());
    GlStateManager.translate(-1.0F, 3.6F, 3.5F);
    GlStateManager.rotate(120.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.rotate(200.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(-135.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.scale(1.0F, 1.0F, 1.0F);
    GlStateManager.translate(5.6F, 0.0F, 0.0F);
    Render<AbstractClientPlayer> render = this.renderManager.<AbstractClientPlayer>getEntityRenderObject(this.mc.thePlayer);
    GlStateManager.disableCull();
    RenderPlayer renderplayer = (RenderPlayer)render;
    renderplayer.renderRightArm(this.mc.thePlayer);
    GlStateManager.enableCull();
}
项目:Backmemed    文件:ItemRenderer.java   
private void renderArm(EnumHandSide p_187455_1_)
{
    this.mc.getTextureManager().bindTexture(this.mc.player.getLocationSkin());
    Render<AbstractClientPlayer> render = this.renderManager.<AbstractClientPlayer>getEntityRenderObject(this.mc.player);
    RenderPlayer renderplayer = (RenderPlayer)render;
    GlStateManager.pushMatrix();
    float f = p_187455_1_ == EnumHandSide.RIGHT ? 1.0F : -1.0F;
    GlStateManager.rotate(92.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(45.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(f * -41.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.translate(f * 0.3F, -1.1F, 0.45F);

    if (p_187455_1_ == EnumHandSide.RIGHT)
    {
        renderplayer.renderRightArm(this.mc.player);
    }
    else
    {
        renderplayer.renderLeftArm(this.mc.player);
    }

    GlStateManager.popMatrix();
}
项目:Backmemed    文件:PlayerItemsLayer.java   
public static void register(Map p_register_0_)
{
    Set set = p_register_0_.keySet();
    boolean flag = false;

    for (Object object : set)
    {
        Object object1 = p_register_0_.get(object);

        if (object1 instanceof RenderPlayer)
        {
            RenderPlayer renderplayer = (RenderPlayer)object1;
            renderplayer.addLayer(new PlayerItemsLayer(renderplayer));
            flag = true;
        }
    }

    if (!flag)
    {
        Config.warn("PlayerItemsLayer not registered");
    }
}
项目:CustomWorldGen    文件:ItemRenderer.java   
private void renderArm(EnumHandSide p_187455_1_)
{
    this.mc.getTextureManager().bindTexture(this.mc.thePlayer.getLocationSkin());
    Render<AbstractClientPlayer> render = this.renderManager.<AbstractClientPlayer>getEntityRenderObject(this.mc.thePlayer);
    RenderPlayer renderplayer = (RenderPlayer)render;
    GlStateManager.pushMatrix();
    float f = p_187455_1_ == EnumHandSide.RIGHT ? 1.0F : -1.0F;
    GlStateManager.rotate(92.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(45.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(f * -41.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.translate(f * 0.3F, -1.1F, 0.45F);

    if (p_187455_1_ == EnumHandSide.RIGHT)
    {
        renderplayer.renderRightArm(this.mc.thePlayer);
    }
    else
    {
        renderplayer.renderLeftArm(this.mc.thePlayer);
    }

    GlStateManager.popMatrix();
}
项目:ExtraUtilities    文件:RenderItemGlove.java   
@SubscribeEvent
public void renderEquippedGlove(final RenderPlayerEvent.Specials.Post event) {
    if (event.entityPlayer == null) {
        return;
    }
    final ItemStack heldItem = event.entityPlayer.getHeldItem();
    if (heldItem == null || heldItem.getItem() != ExtraUtils.glove) {
        return;
    }
    final int dmg = heldItem.getItemDamage();
    final RenderPlayer renderplayer = event.renderer;
    float[] col = EntitySheep.fleeceColorTable[ItemGlove.getColIndex(1, dmg)];
    GL11.glColor3f(col[0], col[1], col[2]);
    Minecraft.getMinecraft().getTextureManager().bindTexture(RenderItemGlove.glove1);
    renderplayer.modelBipedMain.bipedRightArm.render(0.0625f);
    col = EntitySheep.fleeceColorTable[ItemGlove.getColIndex(0, dmg)];
    GL11.glColor3f(col[0], col[1], col[2]);
    Minecraft.getMinecraft().getTextureManager().bindTexture(RenderItemGlove.glove2);
    renderplayer.modelBipedMain.bipedRightArm.render(0.0625f);
}
项目:FissionWarfare    文件:GunRenderEvent.java   
@SubscribeEvent(priority=EventPriority.LOW)
public void gunRenderEvent(RenderPlayerEvent.Pre event) {

    ItemStack item = event.entityPlayer.getHeldItem();

    RenderPlayer rp = event.renderer;

    if (item != null && item.getItem() instanceof ItemGun) {

        rp.modelBipedMain.aimedBow = true;
        rp.modelArmor.aimedBow = true;
        rp.modelArmorChestplate.aimedBow = true;
    } 

    else {
        rp.modelBipedMain.aimedBow = false;
        rp.modelArmor.aimedBow = false;
        rp.modelArmorChestplate.aimedBow = false;
    }
}
项目:InfinityLib    文件:ModelPlayerCustomized.java   
@SuppressWarnings("unchecked")
private static RenderPlayer getOldRenderer(String keyword) {
    RenderManager manager = Minecraft.getMinecraft().getRenderManager();
    Map< Class <? extends Entity > , Render<? extends Entity >> entityRenderMap = manager.entityRenderMap;
    for(Field field : manager.getClass().getDeclaredFields()) {
        if(field.getType() == Map.class) {
            field.setAccessible(true);
            try {
                Object obj = field.get(manager);
                if(obj == entityRenderMap) {
                    continue;
                }
                Map<String, RenderPlayer> skinMap = (Map<String, RenderPlayer>) obj;
                return skinMap.get(keyword);
            } catch (IllegalAccessException e) {
                InfinityLib.instance.getLogger().printStackTrace(e);
            }
        }
    }
    return null;
}
项目:InfinityLib    文件:ModelPlayerCustomized.java   
private static void replaceEntriesInRenderPlayer(RenderPlayer renderer, ModelPlayer newModel) {
    if(renderer == null) {
        return;
    }
    //replace relevant fields in RenderPlayer
    for(Field field : RenderLivingBase.class.getDeclaredFields()) {
        if(field.getType() == ModelBase.class) {
            field.setAccessible(true);
            try {
                field.set(renderer, newModel);
            } catch (IllegalAccessException e) {
                InfinityLib.instance.getLogger().printStackTrace(e);
            }
            break;
        }
    }
}
项目:Factorization    文件:NeptuneCape.java   
void injectModel(EntityPlayer player) {
    Minecraft mc = Minecraft.getMinecraft();
    Render<EntityPlayer> pr = mc.getRenderManager().getEntityRenderObject(player);
    if (!((Render) pr instanceof RenderPlayer)) {
        if (!invalid) {
            Core.logWarning("Unable to patch Player model!");
        }
        invalid = true;
        return;
    }
    RenderPlayer playerRenderer = (RenderPlayer) (Render) pr;
    ModelRenderer head = playerRenderer.getMainModel().bipedHead;
    if (head.childModels != null) {
        for (Iterator<ModelRenderer> it = head.childModels.iterator(); it.hasNext(); ) {
            ModelRenderer child = it.next();
            if (child instanceof LmpMaskRenderer) {
                it.remove();
            }

        }
    }
    head.addChild(new LmpMaskRenderer(playerRenderer.getMainModel()));
}
项目:FusionWarfare    文件:GunRenderEvent.java   
@SubscribeEvent(priority=EventPriority.LOW)
public void gunRenderEvent(RenderPlayerEvent.Pre event) {

    ItemStack item = event.entityPlayer.getHeldItem();

    RenderPlayer rp = event.renderer;

    if (item != null && (item.getItem() instanceof ItemFusionGun || item.getItem() instanceof ItemRocketLauncher)) {

        rp.modelBipedMain.aimedBow = true;
        rp.modelArmor.aimedBow = true;
        rp.modelArmorChestplate.aimedBow = true;
    } else {
        rp.modelBipedMain.aimedBow = false;
        rp.modelArmor.aimedBow = false;
        rp.modelArmorChestplate.aimedBow = false;
    }
}
项目:ExpandedRailsMod    文件:ItemRenderer.java   
private void renderArm(EnumHandSide p_187455_1_)
{
    this.mc.getTextureManager().bindTexture(this.mc.thePlayer.getLocationSkin());
    Render<AbstractClientPlayer> render = this.renderManager.<AbstractClientPlayer>getEntityRenderObject(this.mc.thePlayer);
    RenderPlayer renderplayer = (RenderPlayer)render;
    GlStateManager.pushMatrix();
    float f = p_187455_1_ == EnumHandSide.RIGHT ? 1.0F : -1.0F;
    GlStateManager.rotate(92.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(45.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(f * -41.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.translate(f * 0.3F, -1.1F, 0.45F);

    if (p_187455_1_ == EnumHandSide.RIGHT)
    {
        renderplayer.renderRightArm(this.mc.thePlayer);
    }
    else
    {
        renderplayer.renderLeftArm(this.mc.thePlayer);
    }

    GlStateManager.popMatrix();
}
项目:WearableBackpacks    文件:ProxyClient.java   
@Override
public void init() {
    super.init();
    Minecraft mc = Minecraft.getMinecraft();

    if (BackpacksContent.BACKPACK != null) {
        mc.getBlockColors().registerBlockColorHandler(BLOCK_COLOR, MiscUtils.getBlockFromItem(BackpacksContent.BACKPACK));
        mc.getItemColors().registerItemColorHandler(ITEM_COLOR, BackpacksContent.BACKPACK);
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBackpack.class, new RendererBackpack.TileEntity());
    }

    RenderManager manager = mc.getRenderManager();
    Map<String, RenderPlayer> skinMap = manager.getSkinMap();
    skinMap.get("default").addLayer(new RendererBackpack.Layer());
    skinMap.get("slim").addLayer(new RendererBackpack.Layer());
}
项目:EnderIO    文件:MagnetLayer.java   
@Override
public void doRenderLayer(@Nonnull RenderPlayer renderPlayer, EntityEquipmentSlot equipmentSlot, @Nonnull ItemStack piece,
    @Nonnull AbstractClientPlayer entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_,
    float p_177141_7_, float scale) {
  if (equipmentSlot != null) {
    return;
  }

  GlStateManager.pushMatrix();

  if (entitylivingbaseIn.isSneaking()) {
    GlStateManager.translate(0.0F, 0.2F, 0.0F);
  }

  renderPlayer.getMainModel().bipedHead.postRender(0.0625F);
  GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);

  GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
  GlStateManager.scale(0.75f, 0.9f, 2);
  GlStateManager.translate(0.0F, 2.7f * 0.0625F, .49 * 0.0625F);

  Minecraft.getMinecraft().getItemRenderer().renderItem(entitylivingbaseIn, piece, TransformType.NONE);

  GlStateManager.popMatrix();
}
项目:EnderIO    文件:UpgradeRenderManager.java   
private static void replaceCapeLayer(@Nonnull RenderPlayer renderLivingBase) {
  try {
    List<LayerRenderer<AbstractClientPlayer>> value = ReflectionHelper.getPrivateValue(RenderLivingBase.class, renderLivingBase, "layerRenderers",
        "field_177097_h");
    if (value != null) {
      LayerRenderer<AbstractClientPlayer> capeLayer = null;
      for (LayerRenderer<AbstractClientPlayer> layerRenderer : value) {
        if (layerRenderer instanceof LayerCape && !(layerRenderer instanceof CapeFilterLayer)) {
          capeLayer = layerRenderer;
          break;
        }
      }
      if (capeLayer != null) {
        renderLivingBase.addLayer(new CapeFilterLayer(capeLayer));
        value.remove(capeLayer);
      }
    }
  } catch (UnableToAccessFieldException e) {
    Log.warn("Unable to access RenderLivingBase.layerRenderers, reason: " + e);
  }
}
项目:DecompiledMinecraft    文件:ItemRenderer.java   
private void renderRightArm(RenderPlayer renderPlayerIn)
{
    GlStateManager.pushMatrix();
    GlStateManager.rotate(54.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(64.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(-62.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.translate(0.25F, -0.85F, 0.75F);
    renderPlayerIn.renderRightArm(this.mc.thePlayer);
    GlStateManager.popMatrix();
}
项目:DecompiledMinecraft    文件:ItemRenderer.java   
private void renderLeftArm(RenderPlayer renderPlayerIn)
{
    GlStateManager.pushMatrix();
    GlStateManager.rotate(92.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(45.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(41.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.translate(-0.3F, -1.1F, 0.45F);
    renderPlayerIn.renderLeftArm(this.mc.thePlayer);
    GlStateManager.popMatrix();
}
项目:DecompiledMinecraft    文件:ItemRenderer.java   
private void renderPlayerArms(AbstractClientPlayer clientPlayer)
{
    this.mc.getTextureManager().bindTexture(clientPlayer.getLocationSkin());
    Render<AbstractClientPlayer> render = this.renderManager.<AbstractClientPlayer>getEntityRenderObject(this.mc.thePlayer);
    RenderPlayer renderplayer = (RenderPlayer)render;

    if (!clientPlayer.isInvisible())
    {
        GlStateManager.disableCull();
        this.renderRightArm(renderplayer);
        this.renderLeftArm(renderplayer);
        GlStateManager.enableCull();
    }
}
项目:BaseClient    文件:RenderPlayerOF.java   
private static Map getMapRenderTypes(RenderManager p_getMapRenderTypes_0_)
{
    try
    {
        Field[] afield = Reflector.getFields(RenderManager.class, Map.class);

        for (int i = 0; i < afield.length; ++i)
        {
            Field field = afield[i];
            Map map = (Map)field.get(p_getMapRenderTypes_0_);

            if (map != null)
            {
                Object object = map.get("default");

                if (object instanceof RenderPlayer)
                {
                    return map;
                }
            }
        }

        return null;
    }
    catch (Exception exception)
    {
        Config.warn("Error getting RenderManager.mapRenderTypes");
        Config.warn(exception.getClass().getName() + ": " + exception.getMessage());
        return null;
    }
}
项目:BaseClient    文件:ItemRenderer.java   
private void renderRightArm(RenderPlayer renderPlayerIn)
{
    GlStateManager.pushMatrix();
    GlStateManager.rotate(54.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(64.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(-62.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.translate(0.25F, -0.85F, 0.75F);
    renderPlayerIn.renderRightArm(this.mc.thePlayer);
    GlStateManager.popMatrix();
}
项目:BaseClient    文件:ItemRenderer.java   
private void renderLeftArm(RenderPlayer renderPlayerIn)
{
    GlStateManager.pushMatrix();
    GlStateManager.rotate(92.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(45.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(41.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.translate(-0.3F, -1.1F, 0.45F);
    renderPlayerIn.renderLeftArm(this.mc.thePlayer);
    GlStateManager.popMatrix();
}
项目:BaseClient    文件:ItemRenderer.java   
private void renderPlayerArms(AbstractClientPlayer clientPlayer)
{
    this.mc.getTextureManager().bindTexture(clientPlayer.getLocationSkin());
    Render render = this.renderManager.getEntityRenderObject(this.mc.thePlayer);
    RenderPlayer renderplayer = (RenderPlayer)render;

    if (!clientPlayer.isInvisible())
    {
        GlStateManager.disableCull();
        this.renderRightArm(renderplayer);
        this.renderLeftArm(renderplayer);
        GlStateManager.enableCull();
    }
}
项目:BaseClient    文件:RenderPlayerOF.java   
private static Map getMapRenderTypes(RenderManager p_getMapRenderTypes_0_)
{
    try
    {
        Field[] afield = Reflector.getFields(RenderManager.class, Map.class);

        for (int i = 0; i < afield.length; ++i)
        {
            Field field = afield[i];
            Map map = (Map)field.get(p_getMapRenderTypes_0_);

            if (map != null)
            {
                Object object = map.get("default");

                if (object instanceof RenderPlayer)
                {
                    return map;
                }
            }
        }

        return null;
    }
    catch (Exception exception)
    {
        Config.warn("Error getting RenderManager.mapRenderTypes");
        Config.warn(exception.getClass().getName() + ": " + exception.getMessage());
        return null;
    }
}
项目:BaseClient    文件:ItemRenderer.java   
private void renderRightArm(RenderPlayer renderPlayerIn)
{
    GlStateManager.pushMatrix();
    GlStateManager.rotate(54.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(64.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(-62.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.translate(0.25F, -0.85F, 0.75F);
    renderPlayerIn.renderRightArm(this.mc.thePlayer);
    GlStateManager.popMatrix();
}
项目:BaseClient    文件:ItemRenderer.java   
private void renderLeftArm(RenderPlayer renderPlayerIn)
{
    GlStateManager.pushMatrix();
    GlStateManager.rotate(92.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(45.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(41.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.translate(-0.3F, -1.1F, 0.45F);
    renderPlayerIn.renderLeftArm(this.mc.thePlayer);
    GlStateManager.popMatrix();
}
项目:BaseClient    文件:ItemRenderer.java   
private void renderPlayerArms(AbstractClientPlayer clientPlayer)
{
    this.mc.getTextureManager().bindTexture(clientPlayer.getLocationSkin());
    Render<AbstractClientPlayer> render = this.renderManager.<AbstractClientPlayer>getEntityRenderObject(this.mc.thePlayer);
    RenderPlayer renderplayer = (RenderPlayer)render;

    if (!clientPlayer.isInvisible())
    {
        GlStateManager.disableCull();
        this.renderRightArm(renderplayer);
        this.renderLeftArm(renderplayer);
        GlStateManager.enableCull();
    }
}
项目:Thermionics    文件:LayerScarf.java   
public LayerScarf(RenderPlayer renderer) {
    renderPlayer = renderer;

    for(int i=0; i<4; i++) {
        nodes.add(new Vec3d(0,0,0));
    }
}
项目:Backmemed    文件:ItemRenderer.java   
private void renderArmFirstPerson(float p_187456_1_, float p_187456_2_, EnumHandSide p_187456_3_)
{
    boolean flag = p_187456_3_ != EnumHandSide.LEFT;
    float f = flag ? 1.0F : -1.0F;
    float f1 = MathHelper.sqrt(p_187456_2_);
    float f2 = -0.3F * MathHelper.sin(f1 * (float)Math.PI);
    float f3 = 0.4F * MathHelper.sin(f1 * ((float)Math.PI * 2F));
    float f4 = -0.4F * MathHelper.sin(p_187456_2_ * (float)Math.PI);
    GlStateManager.translate(f * (f2 + 0.64000005F), f3 + -0.6F + p_187456_1_ * -0.6F, f4 + -0.71999997F);
    GlStateManager.rotate(f * 45.0F, 0.0F, 1.0F, 0.0F);
    float f5 = MathHelper.sin(p_187456_2_ * p_187456_2_ * (float)Math.PI);
    float f6 = MathHelper.sin(f1 * (float)Math.PI);
    GlStateManager.rotate(f * f6 * 70.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(f * f5 * -20.0F, 0.0F, 0.0F, 1.0F);
    AbstractClientPlayer abstractclientplayer = this.mc.player;
    this.mc.getTextureManager().bindTexture(abstractclientplayer.getLocationSkin());
    GlStateManager.translate(f * -1.0F, 3.6F, 3.5F);
    GlStateManager.rotate(f * 120.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.rotate(200.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(f * -135.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.translate(f * 5.6F, 0.0F, 0.0F);
    RenderPlayer renderplayer = (RenderPlayer)this.renderManager.getEntityRenderObject(abstractclientplayer);
    GlStateManager.disableCull();

    if (flag)
    {
        renderplayer.renderRightArm(abstractclientplayer);
    }
    else
    {
        renderplayer.renderLeftArm(abstractclientplayer);
    }

    GlStateManager.enableCull();
}
项目:CustomWorldGen    文件:RenderPlayerEvent.java   
public RenderPlayerEvent(EntityPlayer player, RenderPlayer renderer, float partialRenderTick, double x, double y, double z)
{
    super(player);
    this.renderer = renderer;
    this.partialRenderTick = partialRenderTick;
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:CustomWorldGen    文件:ItemRenderer.java   
private void renderArmFirstPerson(float p_187456_1_, float p_187456_2_, EnumHandSide p_187456_3_)
{
    boolean flag = p_187456_3_ != EnumHandSide.LEFT;
    float f = flag ? 1.0F : -1.0F;
    float f1 = MathHelper.sqrt_float(p_187456_2_);
    float f2 = -0.3F * MathHelper.sin(f1 * (float)Math.PI);
    float f3 = 0.4F * MathHelper.sin(f1 * ((float)Math.PI * 2F));
    float f4 = -0.4F * MathHelper.sin(p_187456_2_ * (float)Math.PI);
    GlStateManager.translate(f * (f2 + 0.64000005F), f3 + -0.6F + p_187456_1_ * -0.6F, f4 + -0.71999997F);
    GlStateManager.rotate(f * 45.0F, 0.0F, 1.0F, 0.0F);
    float f5 = MathHelper.sin(p_187456_2_ * p_187456_2_ * (float)Math.PI);
    float f6 = MathHelper.sin(f1 * (float)Math.PI);
    GlStateManager.rotate(f * f6 * 70.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(f * f5 * -20.0F, 0.0F, 0.0F, 1.0F);
    AbstractClientPlayer abstractclientplayer = this.mc.thePlayer;
    this.mc.getTextureManager().bindTexture(abstractclientplayer.getLocationSkin());
    GlStateManager.translate(f * -1.0F, 3.6F, 3.5F);
    GlStateManager.rotate(f * 120.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.rotate(200.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(f * -135.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.translate(f * 5.6F, 0.0F, 0.0F);
    RenderPlayer renderplayer = (RenderPlayer)this.renderManager.getEntityRenderObject(abstractclientplayer);
    GlStateManager.disableCull();

    if (flag)
    {
        renderplayer.renderRightArm(abstractclientplayer);
    }
    else
    {
        renderplayer.renderLeftArm(abstractclientplayer);
    }

    GlStateManager.enableCull();
}
项目:CrystalMod    文件:DisguiseClientHandler.java   
@SideOnly(Side.CLIENT)
public static void renderArmFirstPerson(float progress, float swing, EnumHandSide handSide, boolean mini)
{
    boolean flag = handSide != EnumHandSide.LEFT;
    float f = flag ? 1.0F : -1.0F;
    float f1 = MathHelper.sqrt(swing);
    float f2 = -0.3F * MathHelper.sin(f1 * (float)Math.PI);
    float f3 = 0.4F * MathHelper.sin(f1 * ((float)Math.PI * 2F));
    float f4 = -0.4F * MathHelper.sin(swing * (float)Math.PI);
    GlStateManager.translate(f * (f2 + 0.64000005F), f3 + -0.6F + progress * -0.6F, f4 + -0.71999997F);
    GlStateManager.rotate(f * 45.0F, 0.0F, 1.0F, 0.0F);

    if(mini)GlStateManager.scale(0.8, 0.8, 0.8);

    float f5 = MathHelper.sin(swing * swing * (float)Math.PI);
    float f6 = MathHelper.sin(f1 * (float)Math.PI);
    GlStateManager.rotate(f * f6 * 70.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(f * f5 * -20.0F, 0.0F, 0.0F, 1.0F);
    AbstractClientPlayer abstractclientplayer = (AbstractClientPlayer) CrystalMod.proxy.getClientPlayer();
    Minecraft.getMinecraft().getTextureManager().bindTexture(abstractclientplayer.getLocationSkin());
    GlStateManager.translate(f * -1.0F, 3.6F, 3.5F);
    GlStateManager.rotate(f * 120.0F, 0.0F, 0.0F, 1.0F);
    GlStateManager.rotate(200.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(f * -135.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.translate(f * 5.6F, 0.0F, 0.0F);

    RenderPlayer renderplayer = renderHandOverride;
    GlStateManager.disableCull();

    if (flag)
    {
        renderplayer.renderRightArm(abstractclientplayer);
    }
    else
    {
        renderplayer.renderLeftArm(abstractclientplayer);
    }

    GlStateManager.enableCull();
}
项目:Aether-Legacy    文件:AetherEntityRenderingRegistry.java   
public static void initializePlayerLayers()
{
    RenderPlayer slim_render = Minecraft.getMinecraft().getRenderManager().getSkinMap().get("slim");
    slim_render.addLayer(new AccessoriesLayer(true, (ModelPlayer) slim_render.getMainModel()));

    RenderPlayer default_render = Minecraft.getMinecraft().getRenderManager().getSkinMap().get("default");
    default_render.addLayer(new AccessoriesLayer(false, (ModelPlayer) default_render.getMainModel()));
}
项目:EnderStorage    文件:ProxyClient.java   
@Override
public void init() {
    super.init();
    PacketCustom.assignHandler(EnderStorageCPH.channel, new EnderStorageCPH());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEnderChest.class, new RenderTileEnderChest());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEnderTank.class, new RenderTileEnderTank());

    for (RenderPlayer renderPlayer : Minecraft.getMinecraft().getRenderManager().getSkinMap().values()) {
        renderPlayer.addLayer(new TankLayerRenderer());
    }
}
项目:InfinityLib    文件:ModelPlayerCustomized.java   
public static void replaceOldModel() {
    RenderPlayer renderer = getOldRenderer("default");
    if(renderer == null) {
        InfinityLib.instance.getLogger().debug("Failed overriding left arm swing behaviour");
        return;
    }
    ModelPlayer oldModel = renderer.getMainModel();
    ModelPlayer newModel = null;
    for(Field field : RenderLivingBase.class.getDeclaredFields()) {
        if(field.getType() == ModelBase.class) {
            try {
                field.setAccessible(true);
                Object obj = field.get(renderer);
                if (obj == oldModel) {
                    newModel = MODEL_MAIN;
                    field.set(renderer, newModel);
                    break;
                }
            } catch (Exception e) {
                InfinityLib.instance.getLogger().printStackTrace(e);
            }
        }
    }
    if(newModel != null) {
        //replace relevant fields in RenderPlayer
        replaceEntriesInRenderPlayer(renderer, newModel);
        replaceEntriesInRenderPlayer(getOldRenderer("slim"), MODEL_SLIM);
    }
}
项目:LootableBodies    文件:CorpseRenderer.java   
public CorpseRenderer(RenderManager renderManagerIn) {
    super(renderManagerIn,  new ModelPlayer(0.0F, true), 0.5F);
    thinArmsModel = (ModelPlayer)this.mainModel;
    thickArmsModel =  new ModelPlayer(0.0F, false);
    //
    this.addLayer(new LayerBipedArmor(this));
    this.addLayer(new LayerHeldItem(this));
    this.addLayer(new LayerArrow(this));
    this.addLayer(new LayerCustomHead(this.getMainModel().bipedHead));
    RenderPlayer k;
    RenderPigZombie j;
}
项目:GuiltTrip    文件:EventHandlerClient.java   
@SubscribeEvent
public void onRendererSafeCompatibility(RendererSafeCompatibilityEvent event)
{
    LayerGuiltTrip layer = new LayerGuiltTrip();
    for(Map.Entry<String, RenderPlayer> e : Minecraft.getMinecraft().getRenderManager().skinMap.entrySet())
    {
        e.getValue().addLayer(layer);
    }
}