Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.93 KB | None | 0 0
  1.  if (worldClientIn == null)
  2.         {
  3.             NetHandlerPlayClient nethandlerplayclient = this.getNetHandler();
  4.  
  5.             if (nethandlerplayclient != null)
  6.             {
  7.                 nethandlerplayclient.cleanup();
  8.             }
  9.  
  10.             if (this.theIntegratedServer != null && this.theIntegratedServer.isAnvilFileSet())
  11.             {
  12.                 this.theIntegratedServer.initiateShutdown();
  13.                 this.theIntegratedServer.setStaticInstance();
  14.             }
  15.  
  16.             this.theIntegratedServer = null;
  17.             this.guiAchievement.clearAchievements();
  18.       //TODO: fix      this.entityRenderer.getMapItemRenderer().clearLoadedMaps();
  19.         }
  20.  
  21.         this.renderViewEntity = null;
  22.         this.myNetworkManager = null;
  23.  
  24.         if (this.loadingScreen != null)
  25.         {
  26.            // this.loadingScreen.resetProgressAndMessage(loadingMessage);
  27.            // this.loadingScreen.displayLoadingString("");
  28.         }
  29.  
  30.         if (worldClientIn == null && this.theWorld != null)
  31.         {
  32.          //   this.mcResourcePackRepository.func_148529_f();
  33.           //  this.ingameGUI.func_181029_i();
  34.             this.setServerData((ServerData)null);
  35.             this.integratedServerIsRunning = false;
  36.         }
  37.  
  38.         this.sndManager.stopAllSounds();
  39.         this.theWorld = worldClientIn;
  40.  
  41.         System.out.println("before world is checked");
  42.        
  43.         if (worldClientIn != null)
  44.         {
  45.            
  46.             System.out.println("after world is checked");
  47.            
  48.             if (this.renderGlobal != null)
  49.             {
  50.                
  51.                 System.out.println("hello");
  52.                
  53.                 this.renderGlobal.setWorldAndLoadRenderers(worldClientIn);
  54.                
  55.                 System.out.println("hello 1");
  56.             }
  57.  
  58.             if (this.effectRenderer != null)
  59.             {
  60.                 this.effectRenderer.clearEffects(worldClientIn);
  61.             }
  62.            
  63.            
  64.             if (this.thePlayer == null)
  65.             {
  66.                
  67.                 System.out.println("hi");
  68.                
  69.                 this.thePlayer = this.playerController.func_178892_a(worldClientIn, new StatFileWriter());
  70.                 System.out.flush();
  71.                 System.out.println("hi 2");
  72.                 this.playerController.flipPlayer(this.thePlayer);
  73.             }
  74.  
  75.             this.thePlayer.preparePlayerToSpawn();
  76.             worldClientIn.spawnEntityInWorld(this.thePlayer);
  77.             this.thePlayer.movementInput = new MovementInputFromOptions(this.gameSettings);
  78.             this.playerController.setPlayerCapabilities(this.thePlayer);
  79.             this.renderViewEntity = this.thePlayer;
  80.            
  81.         }
  82.         else
  83.         {
  84.             this.saveLoader.flushCache();
  85.        /*Commenting this out does nothing I have tried before.*/     this.thePlayer = null;
  86.         }
  87.  
  88.         System.gc();
  89.         this.systemTime = 0L;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement