public GuiSlotStatsBlock(GuiStats par1GuiStats) { super(par1GuiStats); this.field_27274_a = par1GuiStats; this.field_27273_c = new ArrayList(); Iterator var2 = StatList.objectMineStats.iterator(); while (var2.hasNext()) { StatCrafting var3 = (StatCrafting) var2.next(); boolean var4 = false; int var5 = var3.getItemID(); if (GuiStats.getStatsFileWriter(par1GuiStats).writeStat(var3) > 0) { var4 = true; } else if (StatList.objectUseStats[var5] != null && GuiStats.getStatsFileWriter(par1GuiStats).writeStat(StatList.objectUseStats[var5]) > 0) { var4 = true; } else if (StatList.objectCraftStats[var5] != null && GuiStats.getStatsFileWriter(par1GuiStats).writeStat(StatList.objectCraftStats[var5]) > 0) { var4 = true; } if (var4) { this.field_27273_c.add(var3); } } this.field_27272_d = new SorterStatsBlock(this, par1GuiStats); }
public int func_27371_a(StatCrafting par1StatCrafting, StatCrafting par2StatCrafting) { int var3 = par1StatCrafting.getItemID(); int var4 = par2StatCrafting.getItemID(); StatBase var5 = null; StatBase var6 = null; if (this.slotStatsItemGUI.field_27271_e == 0) { var5 = StatList.objectBreakStats[var3]; var6 = StatList.objectBreakStats[var4]; } else if (this.slotStatsItemGUI.field_27271_e == 1) { var5 = StatList.objectCraftStats[var3]; var6 = StatList.objectCraftStats[var4]; } else if (this.slotStatsItemGUI.field_27271_e == 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.getStatsFileWriter(this.slotStatsItemGUI.field_27275_a).writeStat(var5); int var8 = GuiStats.getStatsFileWriter(this.slotStatsItemGUI.field_27275_a).writeStat(var6); if (var7 != var8) { return (var7 - var8) * this.slotStatsItemGUI.field_27270_f; } } return var3 - var4; }
public int func_78334_a(StatCrafting par1StatCrafting, StatCrafting par2StatCrafting) { int var3 = par1StatCrafting.getItemID(); int var4 = par2StatCrafting.getItemID(); StatBase var5 = null; StatBase var6 = null; if (this.slotStatsBlockGUI.field_77264_j == 2) { var5 = StatList.mineBlockStatArray[var3]; var6 = StatList.mineBlockStatArray[var4]; } else if (this.slotStatsBlockGUI.field_77264_j == 0) { var5 = StatList.objectCraftStats[var3]; var6 = StatList.objectCraftStats[var4]; } else if (this.slotStatsBlockGUI.field_77264_j == 1) { 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.getStatsFileWriter(this.slotStatsBlockGUI.theStats).writeStat(var5); int var8 = GuiStats.getStatsFileWriter(this.slotStatsBlockGUI.theStats).writeStat(var6); if (var7 != var8) { return (var7 - var8) * this.slotStatsBlockGUI.field_77265_k; } } return var3 - var4; }