public void spawnPlayerWithLoadedChunks(EntityPlayer var1) {
        try {
            NBTTagCompound var2 = this.worldInfo.getPlayerNBTTagCompound();
            if (var2 != null) {
                var1.readFromNBT(var2);
                this.worldInfo.setPlayerNBTTagCompound((NBTTagCompound) null);
            }

            if (this.chunkProvider instanceof ChunkProviderLoadOrGenerate) {
                ChunkProviderLoadOrGenerate var3 = (ChunkProviderLoadOrGenerate) this.chunkProvider;
                int var4 = MathHelper.floor_float((float) ((int) var1.posX)) >> 4;
                int var5 = MathHelper.floor_float((float) ((int) var1.posZ)) >> 4;
                var3.setCurrentChunkOver(var4, var5);
            }

            this.entityJoinedWorld(var1);
        } catch (Exception var6) {
            var6.printStackTrace();
        }

    }