Пример #1
0
 public void onWorldExit() {
   disableSandbox();
   FileUtil.deleteTempDirectory();
   CustomTextureManager.resetTextures();
   CRCManager.clear();
   SpoutcraftChunk.loadedChunks.clear();
   if (clipboardThread != null) {
     clipboardThread.interrupt();
     clipboardThread = null;
   }
   Minecraft.theMinecraft.sndManager.stopMusic();
   PacketDecompressionThread.endThread();
   MaterialData.reset();
   FileDownloadThread.preCacheCompleted.lazySet(0);
   server = -1L;
   inWorldTicks = 0L;
   MaterialData.reset();
   MinimapConfig.getInstance().getServerWaypoints().clear();
 }
Пример #2
0
 public void onWorldEnter() {
   if (player == null) {
     player = ClientPlayer.getInstance();
     player.setPlayer(getHandle().thePlayer);
     getHandle().thePlayer.spoutEntity = player;
   }
   if (player.getHandle() instanceof EntityClientPlayerMP && isSpoutEnabled()) {
     clipboardThread = new ClipboardThread((EntityClientPlayerMP) player.getHandle());
     clipboardThread.start();
   } else if (clipboardThread != null) {
     clipboardThread.interrupt();
     clipboardThread = null;
   }
   SpoutcraftChunk.loadedChunks.clear();
   PacketDecompressionThread.startThread();
   MipMapUtils.initializeMipMaps();
   player
       .getMainScreen()
       .toggleSurvivalHUD(!Minecraft.theMinecraft.playerController.isInCreativeMode());
   inWorldTicks = 0L;
   MinimapConfig.getInstance().getServerWaypoints().clear();
 }