protected void drawSlot( int p_180791_1_, int p_180791_2_, int p_180791_3_, int p_180791_4_, int p_180791_5_, int p_180791_6_) { StatCrafting var7 = this.func_148211_c(p_180791_1_); Item var8 = var7.func_150959_a(); GuiStats.this.drawStatsScreen(p_180791_2_ + 40, p_180791_3_, var8); int var9 = Item.getIdFromItem(var8); this.func_148209_a( StatList.objectBreakStats[var9], p_180791_2_ + 115, p_180791_3_, p_180791_1_ % 2 == 0); this.func_148209_a( StatList.objectCraftStats[var9], p_180791_2_ + 165, p_180791_3_, p_180791_1_ % 2 == 0); this.func_148209_a(var7, p_180791_2_ + 215, p_180791_3_, p_180791_1_ % 2 == 0); }
protected void func_148213_a(StatCrafting p_148213_1_, int p_148213_2_, int p_148213_3_) { if (p_148213_1_ != null) { Item var4 = p_148213_1_.func_150959_a(); ItemStack var5 = new ItemStack(var4); String var6 = var5.getUnlocalizedName(); String var7 = ("" + Translator.format(var6 + ".name", new Object[0])).trim(); if (var7.length() > 0) { int var8 = p_148213_2_ + 12; int var9 = p_148213_3_ - 12; int var10 = GuiStats.this.fontRenderer.getStringWidth(var7); GuiStats.this.drawGradientRect( var8 - 3, var9 - 3, var8 + var10 + 3, var9 + 8 + 3, -1073741824, -1073741824); GuiStats.this.fontRenderer.func_175063_a(var7, (float) var8, (float) var9, -1); } } }
public StatsItem(Minecraft mcIn) { super(mcIn); this.statsHolder = Lists.newArrayList(); Iterator var3 = StatList.itemStats.iterator(); while (var3.hasNext()) { StatCrafting var4 = (StatCrafting) var3.next(); boolean var5 = false; int var6 = Item.getIdFromItem(var4.func_150959_a()); if (GuiStats.this.field_146546_t.writeStat(var4) > 0) { var5 = true; } else if (StatList.objectBreakStats[var6] != null && GuiStats.this.field_146546_t.writeStat(StatList.objectBreakStats[var6]) > 0) { var5 = true; } else if (StatList.objectCraftStats[var6] != null && GuiStats.this.field_146546_t.writeStat(StatList.objectCraftStats[var6]) > 0) { var5 = true; } if (var5) { this.statsHolder.add(var4); } } this.statSorter = new Comparator() { private static final String __OBFID = "CL_00000728"; public int compare(StatCrafting p_compare_1_, StatCrafting p_compare_2_) { int var3 = Item.getIdFromItem(p_compare_1_.func_150959_a()); int var4 = Item.getIdFromItem(p_compare_2_.func_150959_a()); StatBase var5 = null; StatBase var6 = null; if (StatsItem.this.field_148217_o == 0) { var5 = StatList.objectBreakStats[var3]; var6 = StatList.objectBreakStats[var4]; } else if (StatsItem.this.field_148217_o == 1) { var5 = StatList.objectCraftStats[var3]; var6 = StatList.objectCraftStats[var4]; } else if (StatsItem.this.field_148217_o == 2) { var5 = StatList.objectUseStats[var3]; var6 = StatList.objectUseStats[var4]; } if (var5 != null || var6 != null) { if (var5 == null) { return 1; } if (var6 == null) { return -1; } int var7 = GuiStats.this.field_146546_t.writeStat(var5); int var8 = GuiStats.this.field_146546_t.writeStat(var6); if (var7 != var8) { return (var7 - var8) * StatsItem.this.field_148215_p; } } return var3 - var4; } public int compare(Object p_compare_1_, Object p_compare_2_) { return this.compare((StatCrafting) p_compare_1_, (StatCrafting) p_compare_2_); } }; }