当前位置: 首页>>代码示例>>Java>>正文


Java Score.getScorePoints方法代码示例

本文整理汇总了Java中net.minecraft.scoreboard.Score.getScorePoints方法的典型用法代码示例。如果您正苦于以下问题:Java Score.getScorePoints方法的具体用法?Java Score.getScorePoints怎么用?Java Score.getScorePoints使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.scoreboard.Score的用法示例。


在下文中一共展示了Score.getScorePoints方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: S3CPacketUpdateScore

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
public S3CPacketUpdateScore(Score scoreIn)
{
    this.name = scoreIn.getPlayerName();
    this.objective = scoreIn.getObjective().getName();
    this.value = scoreIn.getScorePoints();
    this.action = S3CPacketUpdateScore.Action.CHANGE;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:S3CPacketUpdateScore.java

示例2: func_175781_o

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
protected void func_175781_o(ICommandSender p_175781_1_, String[] p_175781_2_, int p_175781_3_) throws CommandException
{
    Scoreboard scoreboard = this.getScoreboard();
    String s = getEntityName(p_175781_1_, p_175781_2_[p_175781_3_++]);

    if (s.length() > 40)
    {
        throw new SyntaxErrorException("commands.scoreboard.players.name.tooLong", new Object[] {s, Integer.valueOf(40)});
    }
    else
    {
        ScoreObjective scoreobjective = this.getObjective(p_175781_2_[p_175781_3_++], false);

        if (!scoreboard.entityHasObjective(s, scoreobjective))
        {
            throw new CommandException("commands.scoreboard.players.test.notFound", new Object[] {scoreobjective.getName(), s});
        }
        else
        {
            int i = p_175781_2_[p_175781_3_].equals("*") ? Integer.MIN_VALUE : parseInt(p_175781_2_[p_175781_3_]);
            ++p_175781_3_;
            int j = p_175781_3_ < p_175781_2_.length && !p_175781_2_[p_175781_3_].equals("*") ? parseInt(p_175781_2_[p_175781_3_], i) : Integer.MAX_VALUE;
            Score score = scoreboard.getValueFromObjective(s, scoreobjective);

            if (score.getScorePoints() >= i && score.getScorePoints() <= j)
            {
                notifyOperators(p_175781_1_, this, "commands.scoreboard.players.test.success", new Object[] {Integer.valueOf(score.getScorePoints()), Integer.valueOf(i), Integer.valueOf(j)});
            }
            else
            {
                throw new CommandException("commands.scoreboard.players.test.failed", new Object[] {Integer.valueOf(score.getScorePoints()), Integer.valueOf(i), Integer.valueOf(j)});
            }
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:36,代码来源:CommandScoreboard.java

示例3: SPacketUpdateScore

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
public SPacketUpdateScore(Score scoreIn)
{
    this.name = scoreIn.getPlayerName();
    this.objective = scoreIn.getObjective().getName();
    this.value = scoreIn.getScorePoints();
    this.action = SPacketUpdateScore.Action.CHANGE;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:8,代码来源:SPacketUpdateScore.java

示例4: testPlayerScore

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
protected void testPlayerScore(ICommandSender sender, String[] p_184907_2_, int p_184907_3_, MinecraftServer server) throws CommandException
{
    Scoreboard scoreboard = this.getScoreboard(server);
    String s = getEntityName(server, sender, p_184907_2_[p_184907_3_++]);

    if (s.length() > 40)
    {
        throw new SyntaxErrorException("commands.scoreboard.players.name.tooLong", new Object[] {s, Integer.valueOf(40)});
    }
    else
    {
        ScoreObjective scoreobjective = this.convertToObjective(p_184907_2_[p_184907_3_++], false, server);

        if (!scoreboard.entityHasObjective(s, scoreobjective))
        {
            throw new CommandException("commands.scoreboard.players.test.notFound", new Object[] {scoreobjective.getName(), s});
        }
        else
        {
            int i = p_184907_2_[p_184907_3_].equals("*") ? Integer.MIN_VALUE : parseInt(p_184907_2_[p_184907_3_]);
            ++p_184907_3_;
            int j = p_184907_3_ < p_184907_2_.length && !p_184907_2_[p_184907_3_].equals("*") ? parseInt(p_184907_2_[p_184907_3_], i) : Integer.MAX_VALUE;
            Score score = scoreboard.getOrCreateScore(s, scoreobjective);

            if (score.getScorePoints() >= i && score.getScorePoints() <= j)
            {
                notifyCommandListener(sender, this, "commands.scoreboard.players.test.success", new Object[] {Integer.valueOf(score.getScorePoints()), Integer.valueOf(i), Integer.valueOf(j)});
            }
            else
            {
                throw new CommandException("commands.scoreboard.players.test.failed", new Object[] {Integer.valueOf(score.getScorePoints()), Integer.valueOf(i), Integer.valueOf(j)});
            }
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:36,代码来源:CommandScoreboard.java

示例5: getPoints

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
/**
 * Get the points for the given player
 * @param scoreboard    The scoreboard to check
 * @param objective     The objective to check
 * @param player        The player to check
 * @return              The number of points they have.
 */
private int getPoints(Scoreboard scoreboard, ScoreObjective objective, String player) {
    Score score = scoreboard.getObjectivesForEntity(player).get(objective);

    // If we found it...
    if(score != null) return score.getScorePoints();

    // If we need to create it...
    if(data.isCreate()) {
        scoreboard.getOrCreateScore(player, objective).setScorePoints(data.getDefaultValue());
    }

    // Return the default value, since we couldn't find it...
    return data.getDefaultValue();
}
 
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:22,代码来源:BaseScoreboardMatcher.java

示例6: S3CPacketUpdateScore

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
public S3CPacketUpdateScore(Score p_i45227_1_, int p_i45227_2_)
{
    this.field_149329_a = p_i45227_1_.getPlayerName();
    this.field_149327_b = p_i45227_1_.func_96645_d().getName();
    this.field_149328_c = p_i45227_1_.getScorePoints();
    this.field_149326_d = p_i45227_2_;
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:8,代码来源:S3CPacketUpdateScore.java

示例7: getScore

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
/**
 * Returns the score of the "team" (really a fake player) on the scoreboard.
 */
public static int getScore(String displayName) {
	if (Main.mc.theWorld == null) return -1;
	if (Main.mc.theWorld.getScoreboard() == null) return -1;
	Scoreboard board = Minecraft.getMinecraft().theWorld.getScoreboard();
	
	if (board != null) {
		// Grab the main objective of the scoreboard.
        ScoreObjective objective = board.func_96539_a(1);
        
        // Collection of all scoreboard teams.
        Collection teams = board.func_96534_i(objective);
        
        // Iterate through the collection of entries.
        Iterator iterator = teams.iterator();
        while (iterator.hasNext()) {
	        Score score = (Score)iterator.next();
	        
	        // Check if the name of the "team" (player) is what we're looking for.
	        // In actuality, it would be more precise to use an equals check e.g.:
	        // if (score1.getPlayerName().equals(team)) {
	        if (score.getPlayerName().contains(displayName)) {
	        	
	        	// Get the score of the "team" (player) and return it.
		        return score.getScorePoints();
	        }
        }
	}
    return -1;
}
 
开发者ID:NomNuggetNom,项目名称:mcpvp-mod,代码行数:33,代码来源:BoardHelper.java

示例8: Packet207SetScore

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
public Packet207SetScore(Score par1Score, int par2)
{
    this.itemName = par1Score.getPlayerName();
    this.scoreName = par1Score.func_96645_d().getName();
    this.value = par1Score.getScorePoints();
    this.updateOrRemove = par2;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:8,代码来源:Packet207SetScore.java

示例9: renderScoreboard

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
private void renderScoreboard(ScoreObjective p_180475_1_, ScaledResolution p_180475_2_)
{
    Scoreboard scoreboard = p_180475_1_.getScoreboard();
    Collection<Score> collection = scoreboard.getSortedScores(p_180475_1_);
    List<Score> list = Lists.newArrayList(Iterables.filter(collection, new Predicate<Score>()
    {
        public boolean apply(Score p_apply_1_)
        {
            return p_apply_1_.getPlayerName() != null && !p_apply_1_.getPlayerName().startsWith("#");
        }
    }));

    if (list.size() > 15)
    {
        collection = Lists.newArrayList(Iterables.skip(list, collection.size() - 15));
    }
    else
    {
        collection = list;
    }

    int i = this.getFontRenderer().getStringWidth(p_180475_1_.getDisplayName());

    for (Score score : collection)
    {
        ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(score.getPlayerName());
        String s = ScorePlayerTeam.formatPlayerName(scoreplayerteam, score.getPlayerName()) + ": " + EnumChatFormatting.RED + score.getScorePoints();
        i = Math.max(i, this.getFontRenderer().getStringWidth(s));
    }

    int i1 = collection.size() * this.getFontRenderer().FONT_HEIGHT;
    int j1 = p_180475_2_.getScaledHeight() / 2 + i1 / 3;
    int k1 = 3;
    int l1 = p_180475_2_.getScaledWidth() - i - k1;
    int j = 0;

    for (Score score1 : collection)
    {
        ++j;
        ScorePlayerTeam scoreplayerteam1 = scoreboard.getPlayersTeam(score1.getPlayerName());
        String s1 = ScorePlayerTeam.formatPlayerName(scoreplayerteam1, score1.getPlayerName());
        String s2 = EnumChatFormatting.RED + "" + score1.getScorePoints();
        int k = j1 - j * this.getFontRenderer().FONT_HEIGHT;
        int l = p_180475_2_.getScaledWidth() - k1 + 2;
        drawRect(l1 - 2, k, l, k + this.getFontRenderer().FONT_HEIGHT, 1342177280);
        this.getFontRenderer().drawString(s1, l1, k, 553648127);
        this.getFontRenderer().drawString(s2, l - this.getFontRenderer().getStringWidth(s2), k, 553648127);

        if (j == collection.size())
        {
            String s3 = p_180475_1_.getDisplayName();
            drawRect(l1 - 2, k - this.getFontRenderer().FONT_HEIGHT - 1, l, k - 1, 1610612736);
            drawRect(l1 - 2, k - 1, l, k, 1342177280);
            this.getFontRenderer().drawString(s3, l1 + i / 2 - this.getFontRenderer().getStringWidth(s3) / 2, k - this.getFontRenderer().FONT_HEIGHT, 553648127);
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:58,代码来源:GuiIngame.java

示例10: renderScoreboard

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
private void renderScoreboard(ScoreObjective objective, ScaledResolution scaledRes)
{
    Scoreboard scoreboard = objective.getScoreboard();
    Collection<Score> collection = scoreboard.getSortedScores(objective);
    List<Score> list = Lists.newArrayList(Iterables.filter(collection, new Predicate<Score>()
    {
        public boolean apply(@Nullable Score p_apply_1_)
        {
            return p_apply_1_.getPlayerName() != null && !p_apply_1_.getPlayerName().startsWith("#");
        }
    }));

    if (list.size() > 15)
    {
        collection = Lists.newArrayList(Iterables.skip(list, collection.size() - 15));
    }
    else
    {
        collection = list;
    }

    int i = this.getFontRenderer().getStringWidth(objective.getDisplayName());

    for (Score score : collection)
    {
        ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(score.getPlayerName());
        String s = ScorePlayerTeam.formatPlayerName(scoreplayerteam, score.getPlayerName()) + ": " + TextFormatting.RED + score.getScorePoints();
        i = Math.max(i, this.getFontRenderer().getStringWidth(s));
    }

    int i1 = collection.size() * this.getFontRenderer().FONT_HEIGHT;
    int j1 = scaledRes.getScaledHeight() / 2 + i1 / 3;
    int k1 = 3;
    int l1 = scaledRes.getScaledWidth() - i - 3;
    int j = 0;

    for (Score score1 : collection)
    {
        ++j;
        ScorePlayerTeam scoreplayerteam1 = scoreboard.getPlayersTeam(score1.getPlayerName());
        String s1 = ScorePlayerTeam.formatPlayerName(scoreplayerteam1, score1.getPlayerName());
        String s2 = TextFormatting.RED + "" + score1.getScorePoints();
        int k = j1 - j * this.getFontRenderer().FONT_HEIGHT;
        int l = scaledRes.getScaledWidth() - 3 + 2;
        drawRect(l1 - 2, k, l, k + this.getFontRenderer().FONT_HEIGHT, 1342177280);
        this.getFontRenderer().drawString(s1, l1, k, 553648127);
        this.getFontRenderer().drawString(s2, l - this.getFontRenderer().getStringWidth(s2), k, 553648127);

        if (j == collection.size())
        {
            String s3 = objective.getDisplayName();
            drawRect(l1 - 2, k - this.getFontRenderer().FONT_HEIGHT - 1, l, k - 1, 1610612736);
            drawRect(l1 - 2, k - 1, l, k, 1342177280);
            this.getFontRenderer().drawString(s3, l1 + i / 2 - this.getFontRenderer().getStringWidth(s3) / 2, k - this.getFontRenderer().FONT_HEIGHT, 553648127);
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:58,代码来源:GuiIngame.java

示例11: renderScoreboard

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
protected void renderScoreboard(ScoreObjective objective, ScaledResolution scaledRes)
{
    Scoreboard scoreboard = objective.getScoreboard();
    Collection<Score> collection = scoreboard.getSortedScores(objective);
    List<Score> list = Lists.newArrayList(Iterables.filter(collection, new Predicate<Score>()
    {
        public boolean apply(@Nullable Score p_apply_1_)
        {
            return p_apply_1_.getPlayerName() != null && !p_apply_1_.getPlayerName().startsWith("#");
        }
    }));

    if (list.size() > 15)
    {
        collection = Lists.newArrayList(Iterables.skip(list, collection.size() - 15));
    }
    else
    {
        collection = list;
    }

    int i = this.getFontRenderer().getStringWidth(objective.getDisplayName());

    for (Score score : collection)
    {
        ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(score.getPlayerName());
        String s = ScorePlayerTeam.formatPlayerName(scoreplayerteam, score.getPlayerName()) + ": " + TextFormatting.RED + score.getScorePoints();
        i = Math.max(i, this.getFontRenderer().getStringWidth(s));
    }

    int i1 = collection.size() * this.getFontRenderer().FONT_HEIGHT;
    int j1 = scaledRes.getScaledHeight() / 2 + i1 / 3;
    int k1 = 3;
    int l1 = scaledRes.getScaledWidth() - i - 3;
    int j = 0;

    for (Score score1 : collection)
    {
        ++j;
        ScorePlayerTeam scoreplayerteam1 = scoreboard.getPlayersTeam(score1.getPlayerName());
        String s1 = ScorePlayerTeam.formatPlayerName(scoreplayerteam1, score1.getPlayerName());
        String s2 = TextFormatting.RED + "" + score1.getScorePoints();
        int k = j1 - j * this.getFontRenderer().FONT_HEIGHT;
        int l = scaledRes.getScaledWidth() - 3 + 2;
        drawRect(l1 - 2, k, l, k + this.getFontRenderer().FONT_HEIGHT, 1342177280);
        this.getFontRenderer().drawString(s1, l1, k, 553648127);
        this.getFontRenderer().drawString(s2, l - this.getFontRenderer().getStringWidth(s2), k, 553648127);

        if (j == collection.size())
        {
            String s3 = objective.getDisplayName();
            drawRect(l1 - 2, k - this.getFontRenderer().FONT_HEIGHT - 1, l, k - 1, 1610612736);
            drawRect(l1 - 2, k - 1, l, k, 1342177280);
            this.getFontRenderer().drawString(s3, l1 + i / 2 - this.getFontRenderer().getStringWidth(s3) / 2, k - this.getFontRenderer().FONT_HEIGHT, 553648127);
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:58,代码来源:GuiIngame.java

示例12: func_96136_a

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
protected void func_96136_a(ScoreObjective p_96136_1_, int p_96136_2_, int p_96136_3_, FontRenderer p_96136_4_)
{
	Scoreboard scoreboard = p_96136_1_.getScoreboard();
	Collection collection = scoreboard.func_96534_i(p_96136_1_);
	if (collection.size() <= 15)
	{
		int k = p_96136_4_.getStringWidth(p_96136_1_.getDisplayName());
		String s;
		for (Iterator iterator = collection.iterator(); iterator.hasNext(); k = Math.max(k, p_96136_4_.getStringWidth(s)))
		{
			Score score = (Score)iterator.next();
			ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(score.getPlayerName());
			s = ScorePlayerTeam.formatPlayerName(scoreplayerteam, score.getPlayerName()) + ": " + EnumChatFormatting.RED + score.getScorePoints();
		}
		int k1 = collection.size() * p_96136_4_.FONT_HEIGHT;
		int l1 = p_96136_2_ / 2 + k1 / 3;
		byte b0 = 3;
		int i2 = p_96136_3_ - k - b0;
		int l = 0;
		Iterator iterator1 = collection.iterator();
		while (iterator1.hasNext())
		{
			Score score1 = (Score)iterator1.next();
			l++;
			ScorePlayerTeam scoreplayerteam1 = scoreboard.getPlayersTeam(score1.getPlayerName());
			String s1 = ScorePlayerTeam.formatPlayerName(scoreplayerteam1, score1.getPlayerName());
			String s2 = EnumChatFormatting.RED + "" + score1.getScorePoints();
			int i1 = l1 - l * p_96136_4_.FONT_HEIGHT;
			int j1 = p_96136_3_ - b0 + 2;
			drawRect(i2 - 2, i1, j1, i1 + p_96136_4_.FONT_HEIGHT, 1342177280);
			p_96136_4_.drawString(s1, i2, i1, 553648127);
			p_96136_4_.drawString(s2, j1 - p_96136_4_.getStringWidth(s2), i1, 553648127);
			if (l == collection.size())
			{
				String s3 = p_96136_1_.getDisplayName();
				drawRect(i2 - 2, i1 - p_96136_4_.FONT_HEIGHT - 1, j1, i1 - 1, 1610612736);
				drawRect(i2 - 2, i1 - 1, j1, i1, 1342177280);
				p_96136_4_.drawString(s3, i2 + k / 2 - p_96136_4_.getStringWidth(s3) / 2, i1 - p_96136_4_.FONT_HEIGHT, 553648127);
			}
		}
	}
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:43,代码来源:GuiIngame.java

示例13: renderPlayerList

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
protected void renderPlayerList(int width, int height)
{
    ScoreObjective scoreobjective = this.mc.theWorld.getScoreboard().func_96539_a(0);
    NetHandlerPlayClient handler = mc.thePlayer.sendQueue;

    if (mc.gameSettings.keyBindPlayerList.getIsKeyPressed() && (!mc.isIntegratedServerRunning() || handler.playerInfoList.size() > 1 || scoreobjective != null))
    {
        if (pre(PLAYER_LIST)) return;
        this.mc.mcProfiler.startSection("playerList");
        List<GuiPlayerInfo> players = (List<GuiPlayerInfo>)handler.playerInfoList;
        int maxPlayers = handler.currentServerMaxPlayers;
        int rows = maxPlayers;
        int columns = 1;

        for (columns = 1; rows > 20; rows = (maxPlayers + columns - 1) / columns)
        {
            columns++;
        }

        int columnWidth = 300 / columns;

        if (columnWidth > 150)
        {
            columnWidth = 150;
        }

        int left = (width - columns * columnWidth) / 2;
        byte border = 10;
        drawRect(left - 1, border - 1, left + columnWidth * columns, border + 9 * rows, Integer.MIN_VALUE);

        for (int i = 0; i < maxPlayers; i++)
        {
            int xPos = left + i % columns * columnWidth;
            int yPos = border + i / columns * 9;
            drawRect(xPos, yPos, xPos + columnWidth - 1, yPos + 8, 553648127);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glEnable(GL11.GL_ALPHA_TEST);

            if (i < players.size())
            {
                GuiPlayerInfo player = (GuiPlayerInfo)players.get(i);
                ScorePlayerTeam team = mc.theWorld.getScoreboard().getPlayersTeam(player.name);
                String displayName = ScorePlayerTeam.formatPlayerName(team, player.name);
                fontrenderer.drawStringWithShadow(displayName, xPos, yPos, 16777215);

                if (scoreobjective != null)
                {
                    int endX = xPos + fontrenderer.getStringWidth(displayName) + 5;
                    int maxX = xPos + columnWidth - 12 - 5;

                    if (maxX - endX > 5)
                    {
                        Score score = scoreobjective.getScoreboard().func_96529_a(player.name, scoreobjective);
                        String scoreDisplay = EnumChatFormatting.YELLOW + "" + score.getScorePoints();
                        fontrenderer.drawStringWithShadow(scoreDisplay, maxX - fontrenderer.getStringWidth(scoreDisplay), yPos, 16777215);
                    }
                }

                GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

                mc.getTextureManager().bindTexture(Gui.icons);
                int pingIndex = 4;
                int ping = player.responseTime;
                if (ping < 0) pingIndex = 5;
                else if (ping < 150) pingIndex = 0;
                else if (ping < 300) pingIndex = 1;
                else if (ping < 600) pingIndex = 2;
                else if (ping < 1000) pingIndex = 3;

                zLevel += 100.0F;
                drawTexturedModalRect(xPos + columnWidth - 12, yPos, 0, 176 + pingIndex * 8, 10, 8);
                zLevel -= 100.0F;
            }
        }
        post(PLAYER_LIST);
    }
}
 
开发者ID:alexandrage,项目名称:CauldronGit,代码行数:79,代码来源:GuiIngameForge.java

示例14: func_96136_a

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
private void func_96136_a(ScoreObjective par1ScoreObjective, int par2, int par3, FontRenderer par4FontRenderer)
{
    Scoreboard var5 = par1ScoreObjective.getScoreboard();
    Collection var6 = var5.func_96534_i(par1ScoreObjective);

    if (var6.size() <= 15)
    {
        int var7 = par4FontRenderer.getStringWidth(par1ScoreObjective.getDisplayName());
        String var11;

        for (Iterator var8 = var6.iterator(); var8.hasNext(); var7 = Math.max(var7, par4FontRenderer.getStringWidth(var11)))
        {
            Score var9 = (Score)var8.next();
            ScorePlayerTeam var10 = var5.getPlayersTeam(var9.getPlayerName());
            var11 = ScorePlayerTeam.formatPlayerName(var10, var9.getPlayerName()) + ": " + EnumChatFormatting.RED + var9.getScorePoints();
        }

        int var22 = var6.size() * par4FontRenderer.FONT_HEIGHT;
        int var23 = par2 / 2 + var22 / 3;
        byte var25 = 3;
        int var24 = par3 - var7 - var25;
        int var12 = 0;
        Iterator var13 = var6.iterator();

        while (var13.hasNext())
        {
            Score var14 = (Score)var13.next();
            ++var12;
            ScorePlayerTeam var15 = var5.getPlayersTeam(var14.getPlayerName());
            String var16 = ScorePlayerTeam.formatPlayerName(var15, var14.getPlayerName());
            String var17 = EnumChatFormatting.RED + "" + var14.getScorePoints();
            int var19 = var23 - var12 * par4FontRenderer.FONT_HEIGHT;
            int var20 = par3 - var25 + 2;
            drawRect(var24 - 2, var19, var20, var19 + par4FontRenderer.FONT_HEIGHT, 1342177280);
            par4FontRenderer.drawString(var16, var24, var19, 553648127);
            par4FontRenderer.drawString(var17, var20 - par4FontRenderer.getStringWidth(var17), var19, 553648127);

            if (var12 == var6.size())
            {
                String var21 = par1ScoreObjective.getDisplayName();
                drawRect(var24 - 2, var19 - par4FontRenderer.FONT_HEIGHT - 1, var20, var19 - 1, 1610612736);
                drawRect(var24 - 2, var19 - 1, var20, var19, 1342177280);
                par4FontRenderer.drawString(var21, var24 + var7 / 2 - par4FontRenderer.getStringWidth(var21) / 2, var19 - par4FontRenderer.FONT_HEIGHT, 553648127);
            }
        }
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:48,代码来源:GuiIngame.java

示例15: func_96457_a

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
private boolean func_96457_a(EntityPlayer par1EntityPlayer, Map par2Map)
{
    if (par2Map != null && par2Map.size() != 0)
    {
        Iterator var3 = par2Map.entrySet().iterator();
        Entry var4;
        boolean var6;
        int var10;

        do
        {
            if (!var3.hasNext())
            {
                return true;
            }

            var4 = (Entry)var3.next();
            String var5 = (String)var4.getKey();
            var6 = false;

            if (var5.endsWith("_min") && var5.length() > 4)
            {
                var6 = true;
                var5 = var5.substring(0, var5.length() - 4);
            }

            Scoreboard var7 = par1EntityPlayer.getWorldScoreboard();
            ScoreObjective var8 = var7.getObjective(var5);

            if (var8 == null)
            {
                return false;
            }

            Score var9 = par1EntityPlayer.getWorldScoreboard().func_96529_a(par1EntityPlayer.getCommandSenderName(), var8);
            var10 = var9.getScorePoints();

            if (var10 < ((Integer)var4.getValue()).intValue() && var6)
            {
                return false;
            }
        }
        while (var10 <= ((Integer)var4.getValue()).intValue() || var6);

        return false;
    }
    else
    {
        return true;
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:52,代码来源:ServerConfigurationManager.java


注:本文中的net.minecraft.scoreboard.Score.getScorePoints方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。