Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (worldClientIn == null)
- {
- NetHandlerPlayClient nethandlerplayclient = this.getNetHandler();
- if (nethandlerplayclient != null)
- {
- nethandlerplayclient.cleanup();
- }
- if (this.theIntegratedServer != null && this.theIntegratedServer.isAnvilFileSet())
- {
- this.theIntegratedServer.initiateShutdown();
- this.theIntegratedServer.setStaticInstance();
- }
- this.theIntegratedServer = null;
- this.guiAchievement.clearAchievements();
- //TODO: fix this.entityRenderer.getMapItemRenderer().clearLoadedMaps();
- }
- this.renderViewEntity = null;
- this.myNetworkManager = null;
- if (this.loadingScreen != null)
- {
- // this.loadingScreen.resetProgressAndMessage(loadingMessage);
- // this.loadingScreen.displayLoadingString("");
- }
- if (worldClientIn == null && this.theWorld != null)
- {
- // this.mcResourcePackRepository.func_148529_f();
- // this.ingameGUI.func_181029_i();
- this.setServerData((ServerData)null);
- this.integratedServerIsRunning = false;
- }
- this.sndManager.stopAllSounds();
- this.theWorld = worldClientIn;
- System.out.println("before world is checked");
- if (worldClientIn != null)
- {
- System.out.println("after world is checked");
- if (this.renderGlobal != null)
- {
- System.out.println("hello");
- this.renderGlobal.setWorldAndLoadRenderers(worldClientIn);
- System.out.println("hello 1");
- }
- if (this.effectRenderer != null)
- {
- this.effectRenderer.clearEffects(worldClientIn);
- }
- if (this.thePlayer == null)
- {
- System.out.println("hi");
- this.thePlayer = this.playerController.func_178892_a(worldClientIn, new StatFileWriter());
- System.out.flush();
- System.out.println("hi 2");
- this.playerController.flipPlayer(this.thePlayer);
- }
- this.thePlayer.preparePlayerToSpawn();
- worldClientIn.spawnEntityInWorld(this.thePlayer);
- this.thePlayer.movementInput = new MovementInputFromOptions(this.gameSettings);
- this.playerController.setPlayerCapabilities(this.thePlayer);
- this.renderViewEntity = this.thePlayer;
- }
- else
- {
- this.saveLoader.flushCache();
- /*Commenting this out does nothing I have tried before.*/ this.thePlayer = null;
- }
- System.gc();
- this.systemTime = 0L;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement