Java 类net.minecraft.client.gui.spectator.ISpectatorMenuObject 实例源码

项目:DecompiledMinecraft    文件:GuiSpectator.java   
private void func_175266_a(int p_175266_1_, int p_175266_2_, float p_175266_3_, float p_175266_4_, ISpectatorMenuObject p_175266_5_)
{
    this.field_175268_g.getTextureManager().bindTexture(field_175269_a);

    if (p_175266_5_ != SpectatorMenu.field_178657_a)
    {
        int i = (int)(p_175266_4_ * 255.0F);
        GlStateManager.pushMatrix();
        GlStateManager.translate((float)p_175266_2_, p_175266_3_, 0.0F);
        float f = p_175266_5_.func_178662_A_() ? 1.0F : 0.25F;
        GlStateManager.color(f, f, f, p_175266_4_);
        p_175266_5_.func_178663_a(f, i);
        GlStateManager.popMatrix();
        String s = String.valueOf((Object)GameSettings.getKeyDisplayString(this.field_175268_g.gameSettings.keyBindsHotbar[p_175266_1_].getKeyCode()));

        if (i > 3 && p_175266_5_.func_178662_A_())
        {
            this.field_175268_g.fontRendererObj.drawStringWithShadow(s, (float)(p_175266_2_ + 19 - 2 - this.field_175268_g.fontRendererObj.getStringWidth(s)), p_175266_3_ + 6.0F + 3.0F, 16777215 + (i << 24));
        }
    }
}
项目:DecompiledMinecraft    文件:GuiSpectator.java   
public void func_175263_a(ScaledResolution p_175263_1_)
{
    int i = (int)(this.func_175265_c() * 255.0F);

    if (i > 3 && this.field_175271_i != null)
    {
        ISpectatorMenuObject ispectatormenuobject = this.field_175271_i.func_178645_b();
        String s = ispectatormenuobject != SpectatorMenu.field_178657_a ? ispectatormenuobject.getSpectatorName().getFormattedText() : this.field_175271_i.func_178650_c().func_178670_b().getFormattedText();

        if (s != null)
        {
            int j = (p_175263_1_.getScaledWidth() - this.field_175268_g.fontRendererObj.getStringWidth(s)) / 2;
            int k = p_175263_1_.getScaledHeight() - 35;
            GlStateManager.pushMatrix();
            GlStateManager.enableBlend();
            GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
            this.field_175268_g.fontRendererObj.drawStringWithShadow(s, (float)j, (float)k, 16777215 + (i << 24));
            GlStateManager.disableBlend();
            GlStateManager.popMatrix();
        }
    }
}
项目:BaseClient    文件:GuiSpectator.java   
private void func_175266_a(int p_175266_1_, int p_175266_2_, float p_175266_3_, float p_175266_4_, ISpectatorMenuObject p_175266_5_)
{
    this.field_175268_g.getTextureManager().bindTexture(field_175269_a);

    if (p_175266_5_ != SpectatorMenu.field_178657_a)
    {
        int i = (int)(p_175266_4_ * 255.0F);
        GlStateManager.pushMatrix();
        GlStateManager.translate((float)p_175266_2_, p_175266_3_, 0.0F);
        float f = p_175266_5_.func_178662_A_() ? 1.0F : 0.25F;
        GlStateManager.color(f, f, f, p_175266_4_);
        p_175266_5_.func_178663_a(f, i);
        GlStateManager.popMatrix();
        String s = String.valueOf((Object)GameSettings.getKeyDisplayString(this.field_175268_g.gameSettings.keyBindsHotbar[p_175266_1_].getKeyCode()));

        if (i > 3 && p_175266_5_.func_178662_A_())
        {
            this.field_175268_g.fontRendererObj.drawStringWithShadow(s, (float)(p_175266_2_ + 19 - 2 - this.field_175268_g.fontRendererObj.getStringWidth(s)), p_175266_3_ + 6.0F + 3.0F, 16777215 + (i << 24));
        }
    }
}
项目:BaseClient    文件:GuiSpectator.java   
public void func_175263_a(ScaledResolution p_175263_1_)
{
    int i = (int)(this.func_175265_c() * 255.0F);

    if (i > 3 && this.field_175271_i != null)
    {
        ISpectatorMenuObject ispectatormenuobject = this.field_175271_i.func_178645_b();
        String s = ispectatormenuobject != SpectatorMenu.field_178657_a ? ispectatormenuobject.getSpectatorName().getFormattedText() : this.field_175271_i.func_178650_c().func_178670_b().getFormattedText();

        if (s != null)
        {
            int j = (p_175263_1_.getScaledWidth() - this.field_175268_g.fontRendererObj.getStringWidth(s)) / 2;
            int k = p_175263_1_.getScaledHeight() - 35;
            GlStateManager.pushMatrix();
            GlStateManager.enableBlend();
            GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
            this.field_175268_g.fontRendererObj.drawStringWithShadow(s, (float)j, (float)k, 16777215 + (i << 24));
            GlStateManager.disableBlend();
            GlStateManager.popMatrix();
        }
    }
}
项目:BaseClient    文件:GuiSpectator.java   
private void func_175266_a(int p_175266_1_, int p_175266_2_, float p_175266_3_, float p_175266_4_, ISpectatorMenuObject p_175266_5_)
{
    this.field_175268_g.getTextureManager().bindTexture(field_175269_a);

    if (p_175266_5_ != SpectatorMenu.field_178657_a)
    {
        int i = (int)(p_175266_4_ * 255.0F);
        GlStateManager.pushMatrix();
        GlStateManager.translate((float)p_175266_2_, p_175266_3_, 0.0F);
        float f = p_175266_5_.func_178662_A_() ? 1.0F : 0.25F;
        GlStateManager.color(f, f, f, p_175266_4_);
        p_175266_5_.func_178663_a(f, i);
        GlStateManager.popMatrix();
        String s = String.valueOf((Object)GameSettings.getKeyDisplayString(this.field_175268_g.gameSettings.keyBindsHotbar[p_175266_1_].getKeyCode()));

        if (i > 3 && p_175266_5_.func_178662_A_())
        {
            this.field_175268_g.fontRendererObj.drawStringWithShadow(s, (float)(p_175266_2_ + 19 - 2 - this.field_175268_g.fontRendererObj.getStringWidth(s)), p_175266_3_ + 6.0F + 3.0F, 16777215 + (i << 24));
        }
    }
}
项目:BaseClient    文件:GuiSpectator.java   
public void func_175263_a(ScaledResolution p_175263_1_)
{
    int i = (int)(this.func_175265_c() * 255.0F);

    if (i > 3 && this.field_175271_i != null)
    {
        ISpectatorMenuObject ispectatormenuobject = this.field_175271_i.func_178645_b();
        String s = ispectatormenuobject != SpectatorMenu.field_178657_a ? ispectatormenuobject.getSpectatorName().getFormattedText() : this.field_175271_i.func_178650_c().func_178670_b().getFormattedText();

        if (s != null)
        {
            int j = (p_175263_1_.getScaledWidth() - this.field_175268_g.fontRendererObj.getStringWidth(s)) / 2;
            int k = p_175263_1_.getScaledHeight() - 35;
            GlStateManager.pushMatrix();
            GlStateManager.enableBlend();
            GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
            this.field_175268_g.fontRendererObj.drawStringWithShadow(s, (float)j, (float)k, 16777215 + (i << 24));
            GlStateManager.disableBlend();
            GlStateManager.popMatrix();
        }
    }
}
项目:Backmemed    文件:GuiSpectator.java   
private void renderSlot(int p_175266_1_, int p_175266_2_, float p_175266_3_, float p_175266_4_, ISpectatorMenuObject p_175266_5_)
{
    this.mc.getTextureManager().bindTexture(SPECTATOR_WIDGETS);

    if (p_175266_5_ != SpectatorMenu.EMPTY_SLOT)
    {
        int i = (int)(p_175266_4_ * 255.0F);
        GlStateManager.pushMatrix();
        GlStateManager.translate((float)p_175266_2_, p_175266_3_, 0.0F);
        float f = p_175266_5_.isEnabled() ? 1.0F : 0.25F;
        GlStateManager.color(f, f, f, p_175266_4_);
        p_175266_5_.renderIcon(f, i);
        GlStateManager.popMatrix();
        String s = String.valueOf((Object)GameSettings.getKeyDisplayString(this.mc.gameSettings.keyBindsHotbar[p_175266_1_].getKeyCode()));

        if (i > 3 && p_175266_5_.isEnabled())
        {
            this.mc.fontRendererObj.drawStringWithShadow(s, (float)(p_175266_2_ + 19 - 2 - this.mc.fontRendererObj.getStringWidth(s)), p_175266_3_ + 6.0F + 3.0F, 16777215 + (i << 24));
        }
    }
}
项目:Backmemed    文件:GuiSpectator.java   
public void renderSelectedItem(ScaledResolution p_175263_1_)
{
    int i = (int)(this.getHotbarAlpha() * 255.0F);

    if (i > 3 && this.menu != null)
    {
        ISpectatorMenuObject ispectatormenuobject = this.menu.getSelectedItem();
        String s = ispectatormenuobject == SpectatorMenu.EMPTY_SLOT ? this.menu.getSelectedCategory().getPrompt().getFormattedText() : ispectatormenuobject.getSpectatorName().getFormattedText();

        if (s != null)
        {
            int j = (p_175263_1_.getScaledWidth() - this.mc.fontRendererObj.getStringWidth(s)) / 2;
            int k = p_175263_1_.getScaledHeight() - 35;
            GlStateManager.pushMatrix();
            GlStateManager.enableBlend();
            GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
            this.mc.fontRendererObj.drawStringWithShadow(s, (float)j, (float)k, 16777215 + (i << 24));
            GlStateManager.disableBlend();
            GlStateManager.popMatrix();
        }
    }
}
项目:CustomWorldGen    文件:GuiSpectator.java   
private void renderSlot(int p_175266_1_, int p_175266_2_, float p_175266_3_, float p_175266_4_, ISpectatorMenuObject p_175266_5_)
{
    this.mc.getTextureManager().bindTexture(SPECTATOR_WIDGETS);

    if (p_175266_5_ != SpectatorMenu.EMPTY_SLOT)
    {
        int i = (int)(p_175266_4_ * 255.0F);
        GlStateManager.pushMatrix();
        GlStateManager.translate((float)p_175266_2_, p_175266_3_, 0.0F);
        float f = p_175266_5_.isEnabled() ? 1.0F : 0.25F;
        GlStateManager.color(f, f, f, p_175266_4_);
        p_175266_5_.renderIcon(f, i);
        GlStateManager.popMatrix();
        String s = String.valueOf(this.mc.gameSettings.keyBindsHotbar[p_175266_1_].getDisplayName());

        if (i > 3 && p_175266_5_.isEnabled())
        {
            this.mc.fontRendererObj.drawStringWithShadow(s, (float)(p_175266_2_ + 19 - 2 - this.mc.fontRendererObj.getStringWidth(s)), p_175266_3_ + 6.0F + 3.0F, 16777215 + (i << 24));
        }
    }
}
项目:CustomWorldGen    文件:GuiSpectator.java   
public void renderSelectedItem(ScaledResolution p_175263_1_)
{
    int i = (int)(this.getHotbarAlpha() * 255.0F);

    if (i > 3 && this.menu != null)
    {
        ISpectatorMenuObject ispectatormenuobject = this.menu.getSelectedItem();
        String s = ispectatormenuobject == SpectatorMenu.EMPTY_SLOT ? this.menu.getSelectedCategory().getPrompt().getFormattedText() : ispectatormenuobject.getSpectatorName().getFormattedText();

        if (s != null)
        {
            int j = (p_175263_1_.getScaledWidth() - this.mc.fontRendererObj.getStringWidth(s)) / 2;
            int k = p_175263_1_.getScaledHeight() - 35;
            GlStateManager.pushMatrix();
            GlStateManager.enableBlend();
            GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
            this.mc.fontRendererObj.drawStringWithShadow(s, (float)j, (float)k, 16777215 + (i << 24));
            GlStateManager.disableBlend();
            GlStateManager.popMatrix();
        }
    }
}
项目:ExpandedRailsMod    文件:GuiSpectator.java   
private void renderSlot(int p_175266_1_, int p_175266_2_, float p_175266_3_, float p_175266_4_, ISpectatorMenuObject p_175266_5_)
{
    this.mc.getTextureManager().bindTexture(SPECTATOR_WIDGETS);

    if (p_175266_5_ != SpectatorMenu.EMPTY_SLOT)
    {
        int i = (int)(p_175266_4_ * 255.0F);
        GlStateManager.pushMatrix();
        GlStateManager.translate((float)p_175266_2_, p_175266_3_, 0.0F);
        float f = p_175266_5_.isEnabled() ? 1.0F : 0.25F;
        GlStateManager.color(f, f, f, p_175266_4_);
        p_175266_5_.renderIcon(f, i);
        GlStateManager.popMatrix();
        String s = String.valueOf(this.mc.gameSettings.keyBindsHotbar[p_175266_1_].getDisplayName());

        if (i > 3 && p_175266_5_.isEnabled())
        {
            this.mc.fontRendererObj.drawStringWithShadow(s, (float)(p_175266_2_ + 19 - 2 - this.mc.fontRendererObj.getStringWidth(s)), p_175266_3_ + 6.0F + 3.0F, 16777215 + (i << 24));
        }
    }
}
项目:ExpandedRailsMod    文件:GuiSpectator.java   
public void renderSelectedItem(ScaledResolution p_175263_1_)
{
    int i = (int)(this.getHotbarAlpha() * 255.0F);

    if (i > 3 && this.menu != null)
    {
        ISpectatorMenuObject ispectatormenuobject = this.menu.getSelectedItem();
        String s = ispectatormenuobject == SpectatorMenu.EMPTY_SLOT ? this.menu.getSelectedCategory().getPrompt().getFormattedText() : ispectatormenuobject.getSpectatorName().getFormattedText();

        if (s != null)
        {
            int j = (p_175263_1_.getScaledWidth() - this.mc.fontRendererObj.getStringWidth(s)) / 2;
            int k = p_175263_1_.getScaledHeight() - 35;
            GlStateManager.pushMatrix();
            GlStateManager.enableBlend();
            GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
            this.mc.fontRendererObj.drawStringWithShadow(s, (float)j, (float)k, 16777215 + (i << 24));
            GlStateManager.disableBlend();
            GlStateManager.popMatrix();
        }
    }
}
项目:DecompiledMinecraft    文件:TeleportToTeam.java   
public boolean func_178662_A_()
{
    for (ISpectatorMenuObject ispectatormenuobject : this.field_178672_a)
    {
        if (ispectatormenuobject.func_178662_A_())
        {
            return true;
        }
    }

    return false;
}
项目:DecompiledMinecraft    文件:TeleportToPlayer.java   
public TeleportToPlayer(Collection<NetworkPlayerInfo> p_i45493_1_)
{
    this.field_178673_b = Lists.<ISpectatorMenuObject>newArrayList();

    for (NetworkPlayerInfo networkplayerinfo : field_178674_a.sortedCopy(p_i45493_1_))
    {
        if (networkplayerinfo.getGameType() != WorldSettings.GameType.SPECTATOR)
        {
            this.field_178673_b.add(new PlayerMenuObject(networkplayerinfo.getGameProfile()));
        }
    }
}
项目:BaseClient    文件:TeleportToTeam.java   
public boolean func_178662_A_()
{
    for (ISpectatorMenuObject ispectatormenuobject : this.field_178672_a)
    {
        if (ispectatormenuobject.func_178662_A_())
        {
            return true;
        }
    }

    return false;
}
项目:BaseClient    文件:TeleportToPlayer.java   
public TeleportToPlayer(Collection<NetworkPlayerInfo> p_i45493_1_)
{
    this.field_178673_b = Lists.<ISpectatorMenuObject>newArrayList();

    for (NetworkPlayerInfo networkplayerinfo : field_178674_a.sortedCopy(p_i45493_1_))
    {
        if (networkplayerinfo.getGameType() != WorldSettings.GameType.SPECTATOR)
        {
            this.field_178673_b.add(new PlayerMenuObject(networkplayerinfo.getGameProfile()));
        }
    }
}
项目:BaseClient    文件:TeleportToTeam.java   
public boolean func_178662_A_()
{
    for (ISpectatorMenuObject ispectatormenuobject : this.field_178672_a)
    {
        if (ispectatormenuobject.func_178662_A_())
        {
            return true;
        }
    }

    return false;
}
项目:BaseClient    文件:TeleportToPlayer.java   
public TeleportToPlayer(Collection<NetworkPlayerInfo> p_i45493_1_)
{
    this.field_178673_b = Lists.<ISpectatorMenuObject>newArrayList();

    for (NetworkPlayerInfo networkplayerinfo : field_178674_a.sortedCopy(p_i45493_1_))
    {
        if (networkplayerinfo.getGameType() != WorldSettings.GameType.SPECTATOR)
        {
            this.field_178673_b.add(new PlayerMenuObject(networkplayerinfo.getGameProfile()));
        }
    }
}
项目:Backmemed    文件:TeleportToTeam.java   
public boolean isEnabled()
{
    for (ISpectatorMenuObject ispectatormenuobject : this.items)
    {
        if (ispectatormenuobject.isEnabled())
        {
            return true;
        }
    }

    return false;
}
项目:Backmemed    文件:TeleportToPlayer.java   
public TeleportToPlayer(Collection<NetworkPlayerInfo> p_i45493_1_)
{
    this.items = Lists.<ISpectatorMenuObject>newArrayList();

    for (NetworkPlayerInfo networkplayerinfo : PROFILE_ORDER.sortedCopy(p_i45493_1_))
    {
        if (networkplayerinfo.getGameType() != GameType.SPECTATOR)
        {
            this.items.add(new PlayerMenuObject(networkplayerinfo.getGameProfile()));
        }
    }
}
项目:CustomWorldGen    文件:TeleportToTeam.java   
public boolean isEnabled()
{
    for (ISpectatorMenuObject ispectatormenuobject : this.items)
    {
        if (ispectatormenuobject.isEnabled())
        {
            return true;
        }
    }

    return false;
}
项目:CustomWorldGen    文件:TeleportToPlayer.java   
public TeleportToPlayer(Collection<NetworkPlayerInfo> p_i45493_1_)
{
    this.items = Lists.<ISpectatorMenuObject>newArrayList();

    for (NetworkPlayerInfo networkplayerinfo : PROFILE_ORDER.sortedCopy(p_i45493_1_))
    {
        if (networkplayerinfo.getGameType() != GameType.SPECTATOR)
        {
            this.items.add(new PlayerMenuObject(networkplayerinfo.getGameProfile()));
        }
    }
}
项目:ExpandedRailsMod    文件:TeleportToTeam.java   
public boolean isEnabled()
{
    for (ISpectatorMenuObject ispectatormenuobject : this.items)
    {
        if (ispectatormenuobject.isEnabled())
        {
            return true;
        }
    }

    return false;
}
项目:ExpandedRailsMod    文件:TeleportToPlayer.java   
public TeleportToPlayer(Collection<NetworkPlayerInfo> p_i45493_1_)
{
    this.items = Lists.<ISpectatorMenuObject>newArrayList();

    for (NetworkPlayerInfo networkplayerinfo : PROFILE_ORDER.sortedCopy(p_i45493_1_))
    {
        if (networkplayerinfo.getGameType() != GameType.SPECTATOR)
        {
            this.items.add(new PlayerMenuObject(networkplayerinfo.getGameProfile()));
        }
    }
}
项目:DecompiledMinecraft    文件:TeleportToTeam.java   
public List<ISpectatorMenuObject> func_178669_a()
{
    return this.field_178672_a;
}
项目:DecompiledMinecraft    文件:SpectatorDetails.java   
public SpectatorDetails(ISpectatorMenuView p_i45494_1_, List<ISpectatorMenuObject> p_i45494_2_, int p_i45494_3_)
{
    this.field_178684_a = p_i45494_1_;
    this.field_178682_b = p_i45494_2_;
    this.field_178683_c = p_i45494_3_;
}
项目:DecompiledMinecraft    文件:SpectatorDetails.java   
public ISpectatorMenuObject func_178680_a(int p_178680_1_)
{
    return p_178680_1_ >= 0 && p_178680_1_ < this.field_178682_b.size() ? (ISpectatorMenuObject)Objects.firstNonNull(this.field_178682_b.get(p_178680_1_), SpectatorMenu.field_178657_a) : SpectatorMenu.field_178657_a;
}
项目:DecompiledMinecraft    文件:TeleportToPlayer.java   
public List<ISpectatorMenuObject> func_178669_a()
{
    return this.field_178673_b;
}
项目:BaseClient    文件:TeleportToTeam.java   
public List<ISpectatorMenuObject> func_178669_a()
{
    return this.field_178672_a;
}
项目:BaseClient    文件:SpectatorDetails.java   
public SpectatorDetails(ISpectatorMenuView p_i45494_1_, List<ISpectatorMenuObject> p_i45494_2_, int p_i45494_3_)
{
    this.field_178684_a = p_i45494_1_;
    this.field_178682_b = p_i45494_2_;
    this.field_178683_c = p_i45494_3_;
}
项目:BaseClient    文件:SpectatorDetails.java   
public ISpectatorMenuObject func_178680_a(int p_178680_1_)
{
    return p_178680_1_ >= 0 && p_178680_1_ < this.field_178682_b.size() ? (ISpectatorMenuObject)Objects.firstNonNull(this.field_178682_b.get(p_178680_1_), SpectatorMenu.field_178657_a) : SpectatorMenu.field_178657_a;
}
项目:BaseClient    文件:TeleportToPlayer.java   
public List<ISpectatorMenuObject> func_178669_a()
{
    return this.field_178673_b;
}
项目:BaseClient    文件:TeleportToTeam.java   
public List<ISpectatorMenuObject> func_178669_a()
{
    return this.field_178672_a;
}
项目:BaseClient    文件:SpectatorDetails.java   
public SpectatorDetails(ISpectatorMenuView p_i45494_1_, List<ISpectatorMenuObject> p_i45494_2_, int p_i45494_3_)
{
    this.field_178684_a = p_i45494_1_;
    this.field_178682_b = p_i45494_2_;
    this.field_178683_c = p_i45494_3_;
}
项目:BaseClient    文件:SpectatorDetails.java   
public ISpectatorMenuObject func_178680_a(int p_178680_1_)
{
    return p_178680_1_ >= 0 && p_178680_1_ < this.field_178682_b.size() ? (ISpectatorMenuObject)Objects.firstNonNull(this.field_178682_b.get(p_178680_1_), SpectatorMenu.field_178657_a) : SpectatorMenu.field_178657_a;
}
项目:BaseClient    文件:TeleportToPlayer.java   
public List<ISpectatorMenuObject> func_178669_a()
{
    return this.field_178673_b;
}
项目:Backmemed    文件:TeleportToTeam.java   
public List<ISpectatorMenuObject> getItems()
{
    return this.items;
}
项目:Backmemed    文件:SpectatorDetails.java   
public SpectatorDetails(ISpectatorMenuView p_i45494_1_, List<ISpectatorMenuObject> p_i45494_2_, int p_i45494_3_)
{
    this.category = p_i45494_1_;
    this.items = p_i45494_2_;
    this.selectedSlot = p_i45494_3_;
}
项目:Backmemed    文件:SpectatorDetails.java   
public ISpectatorMenuObject getObject(int p_178680_1_)
{
    return p_178680_1_ >= 0 && p_178680_1_ < this.items.size() ? (ISpectatorMenuObject)Objects.firstNonNull(this.items.get(p_178680_1_), SpectatorMenu.EMPTY_SLOT) : SpectatorMenu.EMPTY_SLOT;
}
项目:Backmemed    文件:TeleportToPlayer.java   
public List<ISpectatorMenuObject> getItems()
{
    return this.items;
}