use of net.minecraft.client.gui.IProgressMeter in project CumServerPro by MCUmbrella.
the class NetHandlerPlayClient method handleStatistics.
public void handleStatistics(SPacketStatistics packetIn) {
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
for (Entry<StatBase, Integer> entry : packetIn.getStatisticMap().entrySet()) {
StatBase statbase = entry.getKey();
int k = ((Integer) entry.getValue()).intValue();
this.gameController.player.getStatFileWriter().unlockAchievement(this.gameController.player, statbase, k);
}
this.hasStatistics = true;
if (this.gameController.currentScreen instanceof IProgressMeter) {
((IProgressMeter) this.gameController.currentScreen).onStatsUpdated();
}
}
use of net.minecraft.client.gui.IProgressMeter in project kull by Sxmurai.
the class NetHandlerPlayClient method handleStatistics.
/**
* 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();
}
}
use of net.minecraft.client.gui.IProgressMeter in project Minecraft-SlientClient-Hack by YouNeverKnow00.
the class NetHandlerPlayClient method handleStatistics.
/**
* Updates the players statistics or achievements
*/
public void handleStatistics(SPacketStatistics packetIn) {
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
for (Entry<StatBase, Integer> entry : packetIn.getStatisticMap().entrySet()) {
StatBase statbase = entry.getKey();
int k = ((Integer) entry.getValue()).intValue();
this.gameController.player.getStatFileWriter().unlockAchievement(this.gameController.player, statbase, k);
}
this.hasStatistics = true;
if (this.gameController.currentScreen instanceof IProgressMeter) {
((IProgressMeter) this.gameController.currentScreen).func_193026_g();
}
}
use of net.minecraft.client.gui.IProgressMeter in project WizClient-1.8.9-Version by WizClient.
the class NetHandlerPlayClient method handleStatistics.
/**
* 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);
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();
}
}
Aggregations