public void func_150876_a(EntityPlayerMP p_150876_1_) { int i = this.mcServer.getTickCounter(); Map<StatBase, Integer> map = Maps.<StatBase, Integer>newHashMap(); if (this.field_150886_g || i - this.field_150885_f > 300) { this.field_150885_f = i; for (StatBase statbase : this.func_150878_c()) { map.put(statbase, Integer.valueOf(this.readStat(statbase))); } } p_150876_1_.playerNetServerHandler.sendPacket(new S37PacketStatistics(map)); }
public void func_150876_a(EntityPlayerMP p_150876_1_) { int var2 = this.field_150890_c.getTickCounter(); HashMap var3 = Maps.newHashMap(); if (this.field_150886_g || var2 - this.field_150885_f > 300) { this.field_150885_f = var2; Iterator var4 = this.func_150878_c().iterator(); while (var4.hasNext()) { StatBase var5 = (StatBase)var4.next(); var3.put(var5, Integer.valueOf(this.writeStat(var5))); } } p_150876_1_.playerNetServerHandler.sendPacket(new S37PacketStatistics(var3)); }
public void func_150884_b(EntityPlayerMP p_150884_1_) { HashMap var2 = Maps.newHashMap(); Iterator var3 = AchievementList.achievementList.iterator(); while (var3.hasNext()) { Achievement var4 = (Achievement)var3.next(); if (this.hasAchievementUnlocked(var4)) { var2.put(var4, Integer.valueOf(this.writeStat(var4))); this.field_150888_e.remove(var4); } } p_150884_1_.playerNetServerHandler.sendPacket(new S37PacketStatistics(var2)); }
public void func_150876_a(EntityPlayerMP p_150876_1_) { int i = this.field_150890_c.getTickCounter(); HashMap hashmap = Maps.newHashMap(); if (this.field_150886_g || i - this.field_150885_f > 300) { this.field_150885_f = i; Iterator iterator = this.func_150878_c().iterator(); while (iterator.hasNext()) { StatBase statbase = (StatBase)iterator.next(); hashmap.put(statbase, Integer.valueOf(this.writeStat(statbase))); } } p_150876_1_.playerNetServerHandler.sendPacket(new S37PacketStatistics(hashmap)); }
public void func_150884_b(EntityPlayerMP p_150884_1_) { HashMap hashmap = Maps.newHashMap(); Iterator iterator = AchievementList.achievementList.iterator(); while (iterator.hasNext()) { Achievement achievement = (Achievement)iterator.next(); if (this.hasAchievementUnlocked(achievement)) { hashmap.put(achievement, Integer.valueOf(this.writeStat(achievement))); this.field_150888_e.remove(achievement); } } p_150884_1_.playerNetServerHandler.sendPacket(new S37PacketStatistics(hashmap)); }
public void sendAchievements(EntityPlayerMP player) { Map<StatBase, Integer> map = Maps.<StatBase, Integer>newHashMap(); for (Achievement achievement : AchievementList.achievementList) { if (this.hasAchievementUnlocked(achievement)) { map.put(achievement, Integer.valueOf(this.readStat(achievement))); this.field_150888_e.remove(achievement); } } player.playerNetServerHandler.sendPacket(new S37PacketStatistics(map)); }
/** * Updates the players statistics or achievements */ public void handleStatistics(S37PacketStatistics packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); boolean flag = false; for (Entry<StatBase, Integer> entry : packetIn.func_148974_c().entrySet()) { StatBase statbase = (StatBase) entry.getKey(); int i = ((Integer) entry.getValue()).intValue(); if (statbase.isAchievement() && i > 0) { if (this.field_147308_k && this.gameController.thePlayer.getStatFileWriter().readStat(statbase) == 0) { Achievement achievement = (Achievement) statbase; this.gameController.guiAchievement.displayAchievement(achievement); this.gameController.getTwitchStream().func_152911_a(new MetadataAchievement(achievement), 0L); if (statbase == AchievementList.openInventory) { this.gameController.gameSettings.showInventoryAchievementHint = false; this.gameController.gameSettings.saveOptions(); } } flag = true; } this.gameController.thePlayer.getStatFileWriter().unlockAchievement(this.gameController.thePlayer, statbase, i); } if (!this.field_147308_k && !flag && this.gameController.gameSettings.showInventoryAchievementHint) { this.gameController.guiAchievement.displayUnformattedAchievement(AchievementList.openInventory); } this.field_147308_k = true; if (this.gameController.currentScreen instanceof IProgressMeter) { ((IProgressMeter) this.gameController.currentScreen).doneLoading(); } }
/** * Updates the players statistics or achievements */ public void handleStatistics(S37PacketStatistics packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); boolean flag = false; for (Entry<StatBase, Integer> entry : packetIn.func_148974_c().entrySet()) { StatBase statbase = (StatBase)entry.getKey(); int i = ((Integer)entry.getValue()).intValue(); if (statbase.isAchievement() && i > 0) { if (this.field_147308_k && this.gameController.thePlayer.getStatFileWriter().readStat(statbase) == 0) { Achievement achievement = (Achievement)statbase; this.gameController.guiAchievement.displayAchievement(achievement); this.gameController.getTwitchStream().func_152911_a(new MetadataAchievement(achievement), 0L); if (statbase == AchievementList.openInventory) { this.gameController.gameSettings.showInventoryAchievementHint = false; this.gameController.gameSettings.saveOptions(); } } flag = true; } this.gameController.thePlayer.getStatFileWriter().unlockAchievement(this.gameController.thePlayer, statbase, i); } if (!this.field_147308_k && !flag && this.gameController.gameSettings.showInventoryAchievementHint) { this.gameController.guiAchievement.displayUnformattedAchievement(AchievementList.openInventory); } this.field_147308_k = true; if (this.gameController.currentScreen instanceof IProgressMeter) { ((IProgressMeter)this.gameController.currentScreen).doneLoading(); } }
/** * Updates the players statistics or achievements */ public void handleStatistics(S37PacketStatistics p_147293_1_) { boolean var2 = false; StatBase var5; int var6; for (Iterator var3 = p_147293_1_.func_148974_c().entrySet().iterator(); var3.hasNext(); this.gameController.thePlayer.func_146107_m().func_150873_a(this.gameController.thePlayer, var5, var6)) { Entry var4 = (Entry)var3.next(); var5 = (StatBase)var4.getKey(); var6 = ((Integer)var4.getValue()).intValue(); if (var5.isAchievement() && var6 > 0) { if (this.field_147308_k && this.gameController.thePlayer.func_146107_m().writeStat(var5) == 0) { this.gameController.guiAchievement.func_146256_a((Achievement)var5); if (var5 == AchievementList.openInventory) { this.gameController.gameSettings.showInventoryAchievementHint = false; this.gameController.gameSettings.saveOptions(); } } var2 = true; } } if (!this.field_147308_k && !var2 && this.gameController.gameSettings.showInventoryAchievementHint) { this.gameController.guiAchievement.func_146255_b(AchievementList.openInventory); } this.field_147308_k = true; if (this.gameController.currentScreen instanceof IProgressMeter) { ((IProgressMeter)this.gameController.currentScreen).func_146509_g(); } }
public void handleStatistics(S37PacketStatistics p_147293_1_) { boolean flag = false; StatBase statbase; int i; for (Iterator iterator = p_147293_1_.func_148974_c().entrySet().iterator(); iterator.hasNext(); this.gameController.thePlayer.getStatFileWriter().func_150873_a(this.gameController.thePlayer, statbase, i)) { Entry entry = (Entry)iterator.next(); statbase = (StatBase)entry.getKey(); i = ((Integer)entry.getValue()).intValue(); if (statbase.isAchievement() && i > 0) { if (this.field_147308_k && this.gameController.thePlayer.getStatFileWriter().writeStat(statbase) == 0) { Achievement achievement = (Achievement)statbase; this.gameController.guiAchievement.func_146256_a(achievement); this.gameController.func_152346_Z().func_152911_a(new MetadataAchievement(achievement), 0L); if (statbase == AchievementList.openInventory) { this.gameController.gameSettings.showInventoryAchievementHint = false; this.gameController.gameSettings.saveOptions(); } } flag = true; } } if (!this.field_147308_k && !flag && this.gameController.gameSettings.showInventoryAchievementHint) { this.gameController.guiAchievement.func_146255_b(AchievementList.openInventory); } this.field_147308_k = true; if (this.gameController.currentScreen instanceof IProgressMeter) { ((IProgressMeter)this.gameController.currentScreen).func_146509_g(); } }
/** * Updates the players statistics or achievements */ void handleStatistics(S37PacketStatistics packetIn);
/** * Updates the players statistics or achievements */ void handleStatistics(S37PacketStatistics var1);
void handleStatistics(S37PacketStatistics p_147293_1_);