Java Code Examples for net.minecraft.util.EnumChatFormatting.BLUE

The following are Jave code examples for showing how to use BLUE of the net.minecraft.util.EnumChatFormatting class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: Proyecto-DASI   File: ServerStateMachine.java   Source Code and License Vote up 6 votes
protected void onReceiveMissionInit(MissionInit missionInit)
{
    System.out.println("Mission received: " + missionInit.getMission().getAbout().getSummary());
    ChatComponentText txtMission = new ChatComponentText("Received mission: " + EnumChatFormatting.BLUE + missionInit.getMission().getAbout().getSummary());
    ChatComponentText txtSource = new ChatComponentText("Source: " + EnumChatFormatting.GREEN + missionInit.getClientAgentConnection().getAgentIPAddress());
    MinecraftServer.getServer().getConfigurationManager().sendChatMsg(txtMission);
    MinecraftServer.getServer().getConfigurationManager().sendChatMsg(txtSource);

    ServerStateMachine.this.currentMissionInit = missionInit;
    // Create the Mission Handlers
    try
    {
        this.ssmachine.initialiseHandlers(missionInit);
    }
    catch (Exception e)
    {
        // TODO: What?
    }
    // Move on to next state:
    episodeHasCompleted(ServerState.BUILDING_WORLD);
}
 
Example 2
Project: Proyecto-DASI   File: ServerStateMachine.java   Source Code and License Vote up 6 votes
protected void onReceiveMissionInit(MissionInit missionInit)
{
    System.out.println("Mission received: " + missionInit.getMission().getAbout().getSummary());
    ChatComponentText txtMission = new ChatComponentText("Received mission: " + EnumChatFormatting.BLUE + missionInit.getMission().getAbout().getSummary());
    ChatComponentText txtSource = new ChatComponentText("Source: " + EnumChatFormatting.GREEN + missionInit.getClientAgentConnection().getAgentIPAddress());
    MinecraftServer.getServer().getConfigurationManager().sendChatMsg(txtMission);
    MinecraftServer.getServer().getConfigurationManager().sendChatMsg(txtSource);

    ServerStateMachine.this.currentMissionInit = missionInit;
    // Create the Mission Handlers
    try
    {
        this.ssmachine.initialiseHandlers(missionInit);
    }
    catch (Exception e)
    {
        // TODO: What?
    }
    // Move on to next state:
    episodeHasCompleted(ServerState.BUILDING_WORLD);
}
 
Example 3
Project: DecompiledMinecraft   File: GuiIngestServers.java   Source Code and License Vote up 4 votes
protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
{
    IngestServer ingestserver = this.mc.getTwitchStream().func_152925_v()[entryID];
    String s = ingestserver.serverUrl.replaceAll("\\{stream_key\\}", "");
    String s1 = (int)ingestserver.bitrateKbps + " kbps";
    String s2 = null;
    IngestServerTester ingestservertester = this.mc.getTwitchStream().func_152932_y();

    if (ingestservertester != null)
    {
        if (ingestserver == ingestservertester.func_153040_c())
        {
            s = EnumChatFormatting.GREEN + s;
            s1 = (int)(ingestservertester.func_153030_h() * 100.0F) + "%";
        }
        else if (entryID < ingestservertester.func_153028_p())
        {
            if (ingestserver.bitrateKbps == 0.0F)
            {
                s1 = EnumChatFormatting.RED + "Down!";
            }
        }
        else
        {
            s1 = EnumChatFormatting.OBFUSCATED + "1234" + EnumChatFormatting.RESET + " kbps";
        }
    }
    else if (ingestserver.bitrateKbps == 0.0F)
    {
        s1 = EnumChatFormatting.RED + "Down!";
    }

    p_180791_2_ = p_180791_2_ - 15;

    if (this.isSelected(entryID))
    {
        s2 = EnumChatFormatting.BLUE + "(Preferred)";
    }
    else if (ingestserver.defaultServer)
    {
        s2 = EnumChatFormatting.GREEN + "(Default)";
    }

    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, ingestserver.serverName, p_180791_2_ + 2, p_180791_3_ + 5, 16777215);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s, p_180791_2_ + 2, p_180791_3_ + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT + 5 + 3, 3158064);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s1, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s1), p_180791_3_ + 5, 8421504);

    if (s2 != null)
    {
        GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s2, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s2), p_180791_3_ + 5 + 3 + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT, 8421504);
    }
}
 
Example 4
Project: BaseClient   File: GuiIngestServers.java   Source Code and License Vote up 4 votes
protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
{
    IngestServer ingestserver = this.mc.getTwitchStream().func_152925_v()[entryID];
    String s = ingestserver.serverUrl.replaceAll("\\{stream_key\\}", "");
    String s1 = (int)ingestserver.bitrateKbps + " kbps";
    String s2 = null;
    IngestServerTester ingestservertester = this.mc.getTwitchStream().func_152932_y();

    if (ingestservertester != null)
    {
        if (ingestserver == ingestservertester.func_153040_c())
        {
            s = EnumChatFormatting.GREEN + s;
            s1 = (int)(ingestservertester.func_153030_h() * 100.0F) + "%";
        }
        else if (entryID < ingestservertester.func_153028_p())
        {
            if (ingestserver.bitrateKbps == 0.0F)
            {
                s1 = EnumChatFormatting.RED + "Down!";
            }
        }
        else
        {
            s1 = EnumChatFormatting.OBFUSCATED + "1234" + EnumChatFormatting.RESET + " kbps";
        }
    }
    else if (ingestserver.bitrateKbps == 0.0F)
    {
        s1 = EnumChatFormatting.RED + "Down!";
    }

    p_180791_2_ = p_180791_2_ - 15;

    if (this.isSelected(entryID))
    {
        s2 = EnumChatFormatting.BLUE + "(Preferred)";
    }
    else if (ingestserver.defaultServer)
    {
        s2 = EnumChatFormatting.GREEN + "(Default)";
    }

    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, ingestserver.serverName, p_180791_2_ + 2, p_180791_3_ + 5, 16777215);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s, p_180791_2_ + 2, p_180791_3_ + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT + 5 + 3, 3158064);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s1, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s1), p_180791_3_ + 5, 8421504);

    if (s2 != null)
    {
        GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s2, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s2), p_180791_3_ + 5 + 3 + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT, 8421504);
    }
}
 
Example 5
Project: BaseClient   File: GuiIngestServers.java   Source Code and License Vote up 4 votes
protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
{
    IngestServer ingestserver = this.mc.getTwitchStream().func_152925_v()[entryID];
    String s = ingestserver.serverUrl.replaceAll("\\{stream_key\\}", "");
    String s1 = (int)ingestserver.bitrateKbps + " kbps";
    String s2 = null;
    IngestServerTester ingestservertester = this.mc.getTwitchStream().func_152932_y();

    if (ingestservertester != null)
    {
        if (ingestserver == ingestservertester.func_153040_c())
        {
            s = EnumChatFormatting.GREEN + s;
            s1 = (int)(ingestservertester.func_153030_h() * 100.0F) + "%";
        }
        else if (entryID < ingestservertester.func_153028_p())
        {
            if (ingestserver.bitrateKbps == 0.0F)
            {
                s1 = EnumChatFormatting.RED + "Down!";
            }
        }
        else
        {
            s1 = EnumChatFormatting.OBFUSCATED + "1234" + EnumChatFormatting.RESET + " kbps";
        }
    }
    else if (ingestserver.bitrateKbps == 0.0F)
    {
        s1 = EnumChatFormatting.RED + "Down!";
    }

    p_180791_2_ = p_180791_2_ - 15;

    if (this.isSelected(entryID))
    {
        s2 = EnumChatFormatting.BLUE + "(Preferred)";
    }
    else if (ingestserver.defaultServer)
    {
        s2 = EnumChatFormatting.GREEN + "(Default)";
    }

    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, ingestserver.serverName, p_180791_2_ + 2, p_180791_3_ + 5, 16777215);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s, p_180791_2_ + 2, p_180791_3_ + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT + 5 + 3, 3158064);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s1, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s1), p_180791_3_ + 5, 8421504);

    if (s2 != null)
    {
        GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s2, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s2), p_180791_3_ + 5 + 3 + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT, 8421504);
    }
}