本文整理汇总了Java中net.minecraft.scoreboard.Score.func_96652_c方法的典型用法代码示例。如果您正苦于以下问题:Java Score.func_96652_c方法的具体用法?Java Score.func_96652_c怎么用?Java Score.func_96652_c使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.scoreboard.Score
的用法示例。
在下文中一共展示了Score.func_96652_c方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: func_96457_a
import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
private boolean func_96457_a(EntityPlayer p_96457_1_, Map p_96457_2_) {
if(p_96457_2_ != null && p_96457_2_.size() != 0) {
Iterator var3 = p_96457_2_.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 = p_96457_1_.func_96123_co();
ScoreObjective var8 = var7.func_96518_b(var5);
if(var8 == null) {
return false;
}
Score var9 = p_96457_1_.func_96123_co().func_96529_a(p_96457_1_.func_70023_ak(), var8);
var10 = var9.func_96652_c();
if(var10 < ((Integer)var4.getValue()).intValue() && var6) {
return false;
}
} while(var10 <= ((Integer)var4.getValue()).intValue() || var6);
return false;
} else {
return true;
}
}
示例2: renderPlayerList
import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
protected void renderPlayerList(int width, int height)
{
ScoreObjective scoreobjective = this.field_73839_d.field_71441_e.func_96441_U().func_96539_a(0);
NetHandlerPlayClient handler = field_73839_d.field_71439_g.field_71174_a;
if (field_73839_d.field_71474_y.field_74321_H.func_151470_d() && (!field_73839_d.func_71387_A() || handler.field_147303_b.size() > 1 || scoreobjective != null))
{
if (pre(PLAYER_LIST)) return;
this.field_73839_d.field_71424_I.func_76320_a("playerList");
List<GuiPlayerInfo> players = (List<GuiPlayerInfo>)handler.field_147303_b;
int maxPlayers = handler.field_147304_c;
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;
func_73734_a(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;
func_73734_a(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 = field_73839_d.field_71441_e.func_96441_U().func_96509_i(player.field_78831_a);
String displayName = ScorePlayerTeam.func_96667_a(team, player.field_78831_a);
fontrenderer.func_78261_a(displayName, xPos, yPos, 16777215);
if (scoreobjective != null)
{
int endX = xPos + fontrenderer.func_78256_a(displayName) + 5;
int maxX = xPos + columnWidth - 12 - 5;
if (maxX - endX > 5)
{
Score score = scoreobjective.func_96682_a().func_96529_a(player.field_78831_a, scoreobjective);
String scoreDisplay = EnumChatFormatting.YELLOW + "" + score.func_96652_c();
fontrenderer.func_78261_a(scoreDisplay, maxX - fontrenderer.func_78256_a(scoreDisplay), yPos, 16777215);
}
}
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
field_73839_d.func_110434_K().func_110577_a(Gui.field_110324_m);
int pingIndex = 4;
int ping = player.field_78829_b;
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;
field_73735_i += 100.0F;
func_73729_b(xPos + columnWidth - 12, yPos, 0, 176 + pingIndex * 8, 10, 8);
field_73735_i -= 100.0F;
}
}
post(PLAYER_LIST);
}
}
示例3: Packet207SetScore
import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
public Packet207SetScore(Score p_i1473_1_, int p_i1473_2_) {
this.field_96488_a = p_i1473_1_.func_96653_e();
this.field_96486_b = p_i1473_1_.func_96645_d().func_96679_b();
this.field_96487_c = p_i1473_1_.func_96652_c();
this.field_96485_d = p_i1473_2_;
}
示例4: 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 var5 = p_96136_1_.func_96682_a();
Collection var6 = var5.func_96534_i(p_96136_1_);
if(var6.size() <= 15) {
int var7 = p_96136_4_.func_78256_a(p_96136_1_.func_96678_d());
String var11;
for(Iterator var8 = var6.iterator(); var8.hasNext(); var7 = Math.max(var7, p_96136_4_.func_78256_a(var11))) {
Score var9 = (Score)var8.next();
ScorePlayerTeam var10 = var5.func_96509_i(var9.func_96653_e());
var11 = ScorePlayerTeam.func_96667_a(var10, var9.func_96653_e()) + ": " + EnumChatFormatting.RED + var9.func_96652_c();
}
int var22 = var6.size() * p_96136_4_.field_78288_b;
int var23 = p_96136_2_ / 2 + var22 / 3;
byte var25 = 3;
int var24 = p_96136_3_ - var7 - var25;
int var12 = 0;
Iterator var13 = var6.iterator();
while(var13.hasNext()) {
Score var14 = (Score)var13.next();
++var12;
ScorePlayerTeam var15 = var5.func_96509_i(var14.func_96653_e());
String var16 = ScorePlayerTeam.func_96667_a(var15, var14.func_96653_e());
String var17 = EnumChatFormatting.RED + "" + var14.func_96652_c();
int var19 = var23 - var12 * p_96136_4_.field_78288_b;
int var20 = p_96136_3_ - var25 + 2;
func_73734_a(var24 - 2, var19, var20, var19 + p_96136_4_.field_78288_b, 1342177280);
p_96136_4_.func_78276_b(var16, var24, var19, 553648127);
p_96136_4_.func_78276_b(var17, var20 - p_96136_4_.func_78256_a(var17), var19, 553648127);
if(var12 == var6.size()) {
String var21 = p_96136_1_.func_96678_d();
func_73734_a(var24 - 2, var19 - p_96136_4_.field_78288_b - 1, var20, var19 - 1, 1610612736);
func_73734_a(var24 - 2, var19 - 1, var20, var19, 1342177280);
p_96136_4_.func_78276_b(var21, var24 + var7 / 2 - p_96136_4_.func_78256_a(var21) / 2, var19 - p_96136_4_.field_78288_b, 553648127);
}
}
}
}
示例5: func_96659_a
import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
public int func_96659_a(Score p_96659_1_, Score p_96659_2_) {
return p_96659_1_.func_96652_c() > p_96659_2_.func_96652_c()?1:(p_96659_1_.func_96652_c() < p_96659_2_.func_96652_c()?-1:0);
}