Java 类net.minecraft.client.gui.stream.GuiTwitchUserMode 实例源码

项目:DecompiledMinecraft    文件:TwitchStream.java   
public void func_180605_a(String p_180605_1_, ChatRawMessage[] p_180605_2_)
{
    for (ChatRawMessage chatrawmessage : p_180605_2_)
    {
        this.func_176027_a(chatrawmessage.userName, chatrawmessage);

        if (this.func_176028_a(chatrawmessage.modes, chatrawmessage.subscriptions, this.mc.gameSettings.streamChatUserFilter))
        {
            IChatComponent ichatcomponent = new ChatComponentText(chatrawmessage.userName);
            IChatComponent ichatcomponent1 = new ChatComponentTranslation("chat.stream." + (chatrawmessage.action ? "emote" : "text"), new Object[] {this.twitchComponent, ichatcomponent, EnumChatFormatting.getTextWithoutFormattingCodes(chatrawmessage.message)});

            if (chatrawmessage.action)
            {
                ichatcomponent1.getChatStyle().setItalic(Boolean.valueOf(true));
            }

            IChatComponent ichatcomponent2 = new ChatComponentText("");
            ichatcomponent2.appendSibling(new ChatComponentTranslation("stream.userinfo.chatTooltip", new Object[0]));

            for (IChatComponent ichatcomponent3 : GuiTwitchUserMode.func_152328_a(chatrawmessage.modes, chatrawmessage.subscriptions, (IStream)null))
            {
                ichatcomponent2.appendText("\n");
                ichatcomponent2.appendSibling(ichatcomponent3);
            }

            ichatcomponent.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, ichatcomponent2));
            ichatcomponent.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.TWITCH_USER_INFO, chatrawmessage.userName));
            this.mc.ingameGUI.getChatGUI().printChatMessage(ichatcomponent1);
        }
    }
}
项目:BaseClient    文件:TwitchStream.java   
public void func_180605_a(String p_180605_1_, ChatRawMessage[] p_180605_2_)
{
    for (ChatRawMessage chatrawmessage : p_180605_2_)
    {
        this.func_176027_a(chatrawmessage.userName, chatrawmessage);

        if (this.func_176028_a(chatrawmessage.modes, chatrawmessage.subscriptions, this.mc.gameSettings.streamChatUserFilter))
        {
            IChatComponent ichatcomponent = new ChatComponentText(chatrawmessage.userName);
            IChatComponent ichatcomponent1 = new ChatComponentTranslation("chat.stream." + (chatrawmessage.action ? "emote" : "text"), new Object[] {this.twitchComponent, ichatcomponent, EnumChatFormatting.getTextWithoutFormattingCodes(chatrawmessage.message)});

            if (chatrawmessage.action)
            {
                ichatcomponent1.getChatStyle().setItalic(Boolean.valueOf(true));
            }

            IChatComponent ichatcomponent2 = new ChatComponentText("");
            ichatcomponent2.appendSibling(new ChatComponentTranslation("stream.userinfo.chatTooltip", new Object[0]));

            for (IChatComponent ichatcomponent3 : GuiTwitchUserMode.func_152328_a(chatrawmessage.modes, chatrawmessage.subscriptions, (IStream)null))
            {
                ichatcomponent2.appendText("\n");
                ichatcomponent2.appendSibling(ichatcomponent3);
            }

            ichatcomponent.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, ichatcomponent2));
            ichatcomponent.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.TWITCH_USER_INFO, chatrawmessage.userName));
            this.mc.ingameGUI.getChatGUI().printChatMessage(ichatcomponent1);
        }
    }
}
项目:BaseClient    文件:TwitchStream.java   
public void func_180605_a(String p_180605_1_, ChatRawMessage[] p_180605_2_)
{
    for (ChatRawMessage chatrawmessage : p_180605_2_)
    {
        this.func_176027_a(chatrawmessage.userName, chatrawmessage);

        if (this.func_176028_a(chatrawmessage.modes, chatrawmessage.subscriptions, this.mc.gameSettings.streamChatUserFilter))
        {
            IChatComponent ichatcomponent = new ChatComponentText(chatrawmessage.userName);
            IChatComponent ichatcomponent1 = new ChatComponentTranslation("chat.stream." + (chatrawmessage.action ? "emote" : "text"), new Object[] {this.twitchComponent, ichatcomponent, EnumChatFormatting.getTextWithoutFormattingCodes(chatrawmessage.message)});

            if (chatrawmessage.action)
            {
                ichatcomponent1.getChatStyle().setItalic(Boolean.valueOf(true));
            }

            IChatComponent ichatcomponent2 = new ChatComponentText("");
            ichatcomponent2.appendSibling(new ChatComponentTranslation("stream.userinfo.chatTooltip", new Object[0]));

            for (IChatComponent ichatcomponent3 : GuiTwitchUserMode.func_152328_a(chatrawmessage.modes, chatrawmessage.subscriptions, (IStream)null))
            {
                ichatcomponent2.appendText("\n");
                ichatcomponent2.appendSibling(ichatcomponent3);
            }

            ichatcomponent.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, ichatcomponent2));
            ichatcomponent.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.TWITCH_USER_INFO, chatrawmessage.userName));
            this.mc.ingameGUI.getChatGUI().printChatMessage(ichatcomponent1);
        }
    }
}
项目:Cauldron    文件:TwitchStream.java   
public void func_152903_a(ChatMessage[] p_152903_1_)
{
    ChatMessage[] achatmessage1 = p_152903_1_;
    int i = p_152903_1_.length;

    for (int j = 0; j < i; ++j)
    {
        ChatMessage chatmessage = achatmessage1[j];
        this.func_152939_a(chatmessage.userName, chatmessage);

        if (this.func_152940_a(chatmessage.modes, chatmessage.subscriptions, this.field_152953_e.gameSettings.field_152409_S))
        {
            ChatComponentText chatcomponenttext = new ChatComponentText(chatmessage.userName);
            ChatComponentTranslation chatcomponenttranslation = new ChatComponentTranslation("chat.stream." + (chatmessage.action ? "emote" : "text"), new Object[] {this.field_152954_f, chatcomponenttext, EnumChatFormatting.getTextWithoutFormattingCodes(chatmessage.message)});

            if (chatmessage.action)
            {
                chatcomponenttranslation.getChatStyle().setItalic(Boolean.valueOf(true));
            }

            ChatComponentText chatcomponenttext1 = new ChatComponentText("");
            chatcomponenttext1.appendSibling(new ChatComponentTranslation("stream.userinfo.chatTooltip", new Object[0]));
            Iterator iterator = GuiTwitchUserMode.func_152328_a(chatmessage.modes, chatmessage.subscriptions, (IStream)null).iterator();

            while (iterator.hasNext())
            {
                IChatComponent ichatcomponent = (IChatComponent)iterator.next();
                chatcomponenttext1.appendText("\n");
                chatcomponenttext1.appendSibling(ichatcomponent);
            }

            chatcomponenttext.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, chatcomponenttext1));
            chatcomponenttext.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.TWITCH_USER_INFO, chatmessage.userName));
            this.field_152953_e.ingameGUI.getChatGUI().printChatMessage(chatcomponenttranslation);
        }
    }
}
项目:Cauldron    文件:TwitchStream.java   
public void func_152903_a(ChatMessage[] p_152903_1_)
{
    ChatMessage[] achatmessage1 = p_152903_1_;
    int i = p_152903_1_.length;

    for (int j = 0; j < i; ++j)
    {
        ChatMessage chatmessage = achatmessage1[j];
        this.func_152939_a(chatmessage.userName, chatmessage);

        if (this.func_152940_a(chatmessage.modes, chatmessage.subscriptions, this.field_152953_e.gameSettings.field_152409_S))
        {
            ChatComponentText chatcomponenttext = new ChatComponentText(chatmessage.userName);
            ChatComponentTranslation chatcomponenttranslation = new ChatComponentTranslation("chat.stream." + (chatmessage.action ? "emote" : "text"), new Object[] {this.field_152954_f, chatcomponenttext, EnumChatFormatting.getTextWithoutFormattingCodes(chatmessage.message)});

            if (chatmessage.action)
            {
                chatcomponenttranslation.getChatStyle().setItalic(Boolean.valueOf(true));
            }

            ChatComponentText chatcomponenttext1 = new ChatComponentText("");
            chatcomponenttext1.appendSibling(new ChatComponentTranslation("stream.userinfo.chatTooltip", new Object[0]));
            Iterator iterator = GuiTwitchUserMode.func_152328_a(chatmessage.modes, chatmessage.subscriptions, (IStream)null).iterator();

            while (iterator.hasNext())
            {
                IChatComponent ichatcomponent = (IChatComponent)iterator.next();
                chatcomponenttext1.appendText("\n");
                chatcomponenttext1.appendSibling(ichatcomponent);
            }

            chatcomponenttext.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, chatcomponenttext1));
            chatcomponenttext.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.TWITCH_USER_INFO, chatmessage.userName));
            this.field_152953_e.ingameGUI.getChatGUI().printChatMessage(chatcomponenttranslation);
        }
    }
}