/** * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the * window resizes, the buttonList is cleared beforehand. */ public void initGui() { this.screenTitle = I18n.format("gui.stats", new Object[0]); this.doesGuiPauseGame = true; this.mc.getNetHandler().addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.REQUEST_STATS)); }
/** * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the * window resizes, the buttonList is cleared beforehand. */ public void initGui() { this.mc.getNetHandler().addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.REQUEST_STATS)); this.buttonList.clear(); this.buttonList.add(new GuiOptionButton(1, this.width / 2 + 24, this.height / 2 + 74, 80, 20, I18n.format("gui.done", new Object[0]))); }
/** * Adds the buttons (and other controls) to the screen in question. */ public void initGui() { this.mc.getNetHandler().addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.REQUEST_STATS)); this.buttonList.clear(); this.buttonList.add(new GuiOptionButton(1, this.width / 2 + 24, this.height / 2 + 74, 80, 20, I18n.format("gui.done", new Object[0]))); }
public void initGui() { this.mc.getNetHandler().addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.REQUEST_STATS)); this.buttonList.clear(); this.buttonList.add(new GuiOptionButton(1, this.width / 2 + 24, this.height / 2 + 74, 80, 20, I18n.format("gui.done", new Object[0]))); this.buttonList.add(button = new GuiButton(2, (width - field_146555_f) / 2 + 24, height / 2 + 74, 125, 20, AchievementPage.getTitle(currentPage))); }
/** * Processes the client status updates: respawn attempt from player, opening statistics or achievements, or * acquiring 'open inventory' achievement */ public void processClientStatus(C16PacketClientStatus packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerForPlayer()); this.playerEntity.markPlayerActive(); C16PacketClientStatus.EnumState c16packetclientstatus$enumstate = packetIn.getStatus(); switch (c16packetclientstatus$enumstate) { case PERFORM_RESPAWN: if (this.playerEntity.playerConqueredTheEnd) { this.playerEntity = this.serverController.getConfigurationManager().recreatePlayerEntity(this.playerEntity, 0, true); } else if (this.playerEntity.getServerForPlayer().getWorldInfo().isHardcoreModeEnabled()) { if (this.serverController.isSinglePlayer() && this.playerEntity.getName().equals(this.serverController.getServerOwner())) { this.playerEntity.playerNetServerHandler.kickPlayerFromServer("You have died. Game over, man, it\'s game over!"); this.serverController.deleteWorldAndStopServer(); } else { UserListBansEntry userlistbansentry = new UserListBansEntry(this.playerEntity.getGameProfile(), (Date)null, "(You just lost the game)", (Date)null, "Death in Hardcore"); this.serverController.getConfigurationManager().getBannedPlayers().addEntry(userlistbansentry); this.playerEntity.playerNetServerHandler.kickPlayerFromServer("You have died. Game over, man, it\'s game over!"); } } else { if (this.playerEntity.getHealth() > 0.0F) { return; } this.playerEntity = this.serverController.getConfigurationManager().recreatePlayerEntity(this.playerEntity, 0, false); } break; case REQUEST_STATS: this.playerEntity.getStatFile().func_150876_a(this.playerEntity); break; case OPEN_INVENTORY_ACHIEVEMENT: this.playerEntity.triggerAchievement(AchievementList.openInventory); } }
public void respawnPlayer() { this.sendQueue.addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.PERFORM_RESPAWN)); }
private void sendRespawnPacket() { this.mc.thePlayer.sendQueue.addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.PERFORM_RESPAWN)); this.mc.displayGuiScreen((GuiScreen)null); }
/** * Processes the client status updates: respawn attempt from player, opening statistics or achievements, or * acquiring 'open inventory' achievement */ public void processClientStatus(C16PacketClientStatus p_147342_1_) { this.playerEntity.func_143004_u(); C16PacketClientStatus.EnumState var2 = p_147342_1_.func_149435_c(); switch (NetHandlerPlayServer.SwitchEnumState.field_151290_a[var2.ordinal()]) { case 1: if (this.playerEntity.playerConqueredTheEnd) { this.playerEntity = this.serverController.getConfigurationManager().respawnPlayer(this.playerEntity, 0, true); } else if (this.playerEntity.getServerForPlayer().getWorldInfo().isHardcoreModeEnabled()) { if (this.serverController.isSinglePlayer() && this.playerEntity.getCommandSenderName().equals(this.serverController.getServerOwner())) { this.playerEntity.playerNetServerHandler.kickPlayerFromServer("You have died. Game over, man, it\'s game over!"); this.serverController.deleteWorldAndStopServer(); } else { BanEntry var3 = new BanEntry(this.playerEntity.getCommandSenderName()); var3.setBanReason("Death in Hardcore"); this.serverController.getConfigurationManager().getBannedPlayers().put(var3); this.playerEntity.playerNetServerHandler.kickPlayerFromServer("You have died. Game over, man, it\'s game over!"); } } else { if (this.playerEntity.getHealth() > 0.0F) { return; } this.playerEntity = this.serverController.getConfigurationManager().respawnPlayer(this.playerEntity, 0, false); } break; case 2: this.playerEntity.func_147099_x().func_150876_a(this.playerEntity); break; case 3: this.playerEntity.triggerAchievement(AchievementList.openInventory); } }
private void func_146574_g() { this.mc.thePlayer.sendQueue.addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.PERFORM_RESPAWN)); this.mc.displayGuiScreen((GuiScreen)null); }
/** * Adds the buttons (and other controls) to the screen in question. */ public void initGui() { this.field_146542_f = I18n.format("gui.stats", new Object[0]); this.mc.getNetHandler().addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.REQUEST_STATS)); }
@Override public void processClientStatus(C16PacketClientStatus p_147342_1_) { }
public void processClientStatus(C16PacketClientStatus p_147342_1_) { this.playerEntity.func_143004_u(); C16PacketClientStatus.EnumState enumstate = p_147342_1_.func_149435_c(); switch (NetHandlerPlayServer.SwitchEnumState.field_151290_a[enumstate.ordinal()]) { case 1: if (this.playerEntity.playerConqueredTheEnd) { // Cauldron start if (this.playerEntity.dimension == -1) // coming from end { // We really should be calling transferPlayerToDimension since the player is coming in contact with a portal. this.serverController.getConfigurationManager().respawnPlayer(this.playerEntity, 0, true); // set flag to indicate player is leaving end. } else // not coming from end { this.playerEntity = this.serverController.getConfigurationManager().respawnPlayer(this.playerEntity, 0, false); } // Cauldron end } else if (this.playerEntity.getServerForPlayer().getWorldInfo().isHardcoreModeEnabled()) { if (this.serverController.isSinglePlayer() && this.playerEntity.getCommandSenderName().equals(this.serverController.getServerOwner())) { this.playerEntity.playerNetServerHandler.kickPlayerFromServer("You have died. Game over, man, it\'s game over!"); this.serverController.deleteWorldAndStopServer(); } else { UserListBansEntry userlistbansentry = new UserListBansEntry(this.playerEntity.getGameProfile(), (Date)null, "(You just lost the game)", (Date)null, "Death in Hardcore"); this.serverController.getConfigurationManager().func_152608_h().func_152687_a(userlistbansentry); this.playerEntity.playerNetServerHandler.kickPlayerFromServer("You have died. Game over, man, it\'s game over!"); } } else { if (this.playerEntity.getHealth() > 0.0F) { return; } this.playerEntity = this.serverController.getConfigurationManager().respawnPlayer(this.playerEntity, playerEntity.dimension, false); } break; case 2: this.playerEntity.func_147099_x().func_150876_a(this.playerEntity); break; case 3: this.playerEntity.triggerAchievement(AchievementList.openInventory); } }
public void initGui() { this.field_146542_f = I18n.format("gui.stats", new Object[0]); this.mc.getNetHandler().addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.REQUEST_STATS)); }
public void processClientStatus(C16PacketClientStatus p_147342_1_) { this.playerEntity.func_143004_u(); C16PacketClientStatus.EnumState enumstate = p_147342_1_.func_149435_c(); switch (NetHandlerPlayServer.SwitchEnumState.field_151290_a[enumstate.ordinal()]) { case 1: if (this.playerEntity.playerConqueredTheEnd) { this.playerEntity = this.serverController.getConfigurationManager().respawnPlayer(this.playerEntity, 0, true); } else if (this.playerEntity.getServerForPlayer().getWorldInfo().isHardcoreModeEnabled()) { if (this.serverController.isSinglePlayer() && this.playerEntity.getCommandSenderName().equals(this.serverController.getServerOwner())) { this.playerEntity.playerNetServerHandler.kickPlayerFromServer("You have died. Game over, man, it\'s game over!"); this.serverController.deleteWorldAndStopServer(); } else { UserListBansEntry userlistbansentry = new UserListBansEntry(this.playerEntity.getGameProfile(), (Date)null, "(You just lost the game)", (Date)null, "Death in Hardcore"); this.serverController.getConfigurationManager().func_152608_h().func_152687_a(userlistbansentry); this.playerEntity.playerNetServerHandler.kickPlayerFromServer("You have died. Game over, man, it\'s game over!"); } } else { if (this.playerEntity.getHealth() > 0.0F) { return; } this.playerEntity = this.serverController.getConfigurationManager().respawnPlayer(this.playerEntity, playerEntity.dimension, false); } break; case 2: this.playerEntity.func_147099_x().func_150876_a(this.playerEntity); break; case 3: this.playerEntity.triggerAchievement(AchievementList.openInventory); } }
/** * Processes the client status updates: respawn attempt from player, opening statistics or achievements, or * acquiring 'open inventory' achievement */ void processClientStatus(C16PacketClientStatus packetIn);
/** * Processes the client status updates: respawn attempt from player, opening statistics or achievements, or * acquiring 'open inventory' achievement */ void processClientStatus(C16PacketClientStatus var1);
void processClientStatus(C16PacketClientStatus p_147342_1_);