public void func_72356_a(EntityPlayerMP p_72356_1_, int p_72356_2_) { int var3 = p_72356_1_.field_71093_bK; WorldServer var4 = this.field_72400_f.func_71218_a(p_72356_1_.field_71093_bK); p_72356_1_.field_71093_bK = p_72356_2_; WorldServer var5 = this.field_72400_f.func_71218_a(p_72356_1_.field_71093_bK); p_72356_1_.field_71135_a.func_72567_b(new Packet9Respawn(p_72356_1_.field_71093_bK, (byte)p_72356_1_.field_70170_p.field_73013_u, var5.func_72912_H().func_76067_t(), var5.func_72800_K(), p_72356_1_.field_71134_c.func_73081_b())); var4.func_72973_f(p_72356_1_); p_72356_1_.field_70128_L = false; this.func_82448_a(p_72356_1_, var3, var4, var5); this.func_72375_a(p_72356_1_, var4); p_72356_1_.field_71135_a.func_72569_a(p_72356_1_.field_70165_t, p_72356_1_.field_70163_u, p_72356_1_.field_70161_v, p_72356_1_.field_70177_z, p_72356_1_.field_70125_A); p_72356_1_.field_71134_c.func_73080_a(var5); this.func_72354_b(p_72356_1_, var5); this.func_72385_f(p_72356_1_); Iterator var6 = p_72356_1_.func_70651_bq().iterator(); while(var6.hasNext()) { PotionEffect var7 = (PotionEffect)var6.next(); p_72356_1_.field_71135_a.func_72567_b(new Packet41EntityEffect(p_72356_1_.field_70157_k, var7)); } }
/** * respawns the player */ public void handleRespawn(Packet9Respawn par1Packet9Respawn) { if (par1Packet9Respawn.respawnDimension != this.mc.thePlayer.dimension) { this.doneLoadingTerrain = false; Scoreboard scoreboard = this.worldClient.getScoreboard(); this.worldClient = new WorldClient(this, new WorldSettings(0L, par1Packet9Respawn.gameType, false, this.mc.theWorld.getWorldInfo().isHardcoreModeEnabled(), par1Packet9Respawn.terrainType), par1Packet9Respawn.respawnDimension, par1Packet9Respawn.difficulty, this.mc.mcProfiler, this.mc.getLogAgent()); this.worldClient.func_96443_a(scoreboard); this.worldClient.isRemote = true; this.mc.loadWorld(this.worldClient); this.mc.thePlayer.dimension = par1Packet9Respawn.respawnDimension; this.mc.displayGuiScreen(new GuiDownloadTerrain(this)); } this.mc.setDimensionAndSpawnPlayer(par1Packet9Respawn.respawnDimension); this.mc.playerController.setGameType(par1Packet9Respawn.gameType); }
public void transferPlayerToDimension(EntityPlayerMP par1EntityPlayerMP, int par2, Teleporter teleporter) { int j = par1EntityPlayerMP.dimension; WorldServer worldserver = this.mcServer.worldServerForDimension(par1EntityPlayerMP.dimension); par1EntityPlayerMP.dimension = par2; WorldServer worldserver1 = this.mcServer.worldServerForDimension(par1EntityPlayerMP.dimension); par1EntityPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet9Respawn(par1EntityPlayerMP.dimension, (byte)par1EntityPlayerMP.worldObj.difficultySetting, worldserver1.getWorldInfo().getTerrainType(), worldserver1.getHeight(), par1EntityPlayerMP.theItemInWorldManager.getGameType())); worldserver.removePlayerEntityDangerously(par1EntityPlayerMP); par1EntityPlayerMP.isDead = false; this.transferEntityToWorld(par1EntityPlayerMP, j, worldserver, worldserver1, teleporter); this.func_72375_a(par1EntityPlayerMP, worldserver); par1EntityPlayerMP.playerNetServerHandler.setPlayerLocation(par1EntityPlayerMP.posX, par1EntityPlayerMP.posY, par1EntityPlayerMP.posZ, par1EntityPlayerMP.rotationYaw, par1EntityPlayerMP.rotationPitch); par1EntityPlayerMP.theItemInWorldManager.setWorld(worldserver1); this.updateTimeAndWeatherForPlayer(par1EntityPlayerMP, worldserver1); this.syncPlayerInventory(par1EntityPlayerMP); Iterator iterator = par1EntityPlayerMP.getActivePotionEffects().iterator(); while (iterator.hasNext()) { PotionEffect potioneffect = (PotionEffect)iterator.next(); par1EntityPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet41EntityEffect(par1EntityPlayerMP.entityId, potioneffect)); } GameRegistry.onPlayerChangedDimension(par1EntityPlayerMP); }
public void func_72483_a(Packet9Respawn p_72483_1_) { if(p_72483_1_.field_73373_a != this.field_72563_h.field_71439_g.field_71093_bK) { this.field_72561_j = false; Scoreboard var2 = this.field_72564_i.func_96441_U(); this.field_72564_i = new WorldClient(this, new WorldSettings(0L, p_72483_1_.field_73369_d, false, this.field_72563_h.field_71441_e.func_72912_H().func_76093_s(), p_72483_1_.field_73370_e), p_72483_1_.field_73373_a, p_72483_1_.field_73371_b, this.field_72563_h.field_71424_I, this.field_72563_h.func_98033_al()); this.field_72564_i.func_96443_a(var2); this.field_72564_i.field_72995_K = true; this.field_72563_h.func_71403_a(this.field_72564_i); this.field_72563_h.field_71439_g.field_71093_bK = p_72483_1_.field_73373_a; this.field_72563_h.func_71373_a(new GuiDownloadTerrain(this)); } this.field_72563_h.func_71354_a(p_72483_1_.field_73373_a); this.field_72563_h.field_71442_b.func_78746_a(p_72483_1_.field_73369_d); }
public static void transferPlayerToDimension(EntityPlayerMP player, int dimension, double x, double y, double z) { //Get old and new values int oldDim = player.dimension; WorldServer oldServer = player.mcServer.worldServerForDimension(oldDim); WorldServer newServer = player.mcServer.worldServerForDimension(dimension); player.dimension = dimension; //Send Dimension change packet to client player.playerNetServerHandler.sendPacketToPlayer(new Packet9Respawn(player.dimension, (byte)player.worldObj.difficultySetting, newServer.getWorldInfo().getTerrainType(), newServer.getHeight(), player.theItemInWorldManager.getGameType())); //Remove entity player from old dimension oldServer.removePlayerEntityDangerously(player); player.isDead = false; oldServer.getPlayerManager().removePlayer(player); //Prepare spawn newServer.getPlayerManager().addPlayer(player); newServer.theChunkProviderServer.loadChunk((int)x >> 4, (int)z >> 4); newServer.spawnEntityInWorld(player); player.setLocationAndAngles(x, y, z, player.rotationYaw, player.rotationPitch); newServer.updateEntityWithOptionalForce(player, false); //Setup new world location player.setWorld(newServer); player.playerNetServerHandler.setPlayerLocation(player.posX, player.posY, player.posZ, player.rotationYaw, player.rotationPitch); player.theItemInWorldManager.setWorld(newServer); //Adjust parameters DimensionTeleporter.updateTimeAndWeatherForPlayer(player, newServer); DimensionTeleporter.syncPlayerInventory(player); GameRegistry.onPlayerChangedDimension(player); }
@Override public void handleRespawn(Packet9Respawn par1Packet9Respawn) { nch.handleRespawn(par1Packet9Respawn); }
public void func_72483_a(Packet9Respawn p_72483_1_) { this.func_72509_a(p_72483_1_); }
/** * respawns the player */ public void handleRespawn(Packet9Respawn par1Packet9Respawn) {}
public void func_72483_a(Packet9Respawn p_72483_1_) {}