Final Update P2

This commit is contained in:
peytonplayz585 2023-07-31 19:08:19 -07:00
parent b401cf2d47
commit 66aadf368a
3 changed files with 5 additions and 5 deletions

View File

@ -1130,7 +1130,7 @@ function nP_MinecraftMain_main($args) {
if ($ex2 !== null && $ex2 instanceof nPn_NBTTagCompound) if ($ex2 !== null && $ex2 instanceof nPn_NBTTagCompound)
nPs_LevelStorageManager_levelStorage = $ex2; nPs_LevelStorageManager_levelStorage = $ex2;
} }
if (!nPs_LevelStorageManager_levelStorage.$tagMap.$elementCount) if (!(nPs_LevelStorageManager_levelStorage.$tagMap !== null && nPs_LevelStorageManager_levelStorage.$tagMap.$elementCount))
nPs_LevelStorageManager_levelStorage = null; nPs_LevelStorageManager_levelStorage = null;
$ex2 = nmc_Minecraft__init_(olo_WebGL_getCanvasWidth(), olo_WebGL_getCanvasHeight()); $ex2 = nmc_Minecraft__init_(olo_WebGL_getCanvasWidth(), olo_WebGL_getCanvasHeight());
var$7 = new nmc_Session; var$7 = new nmc_Session;
@ -4585,7 +4585,7 @@ function nPs_LevelStorageManager_saveLevelData() {
if ($rt_suspending()) { if ($rt_suspending()) {
break main; break main;
} }
if (!nPs_LevelStorageManager_levelStorage.$tagMap.$elementCount) if (!(nPs_LevelStorageManager_levelStorage.$tagMap !== null && nPs_LevelStorageManager_levelStorage.$tagMap.$elementCount))
nPs_LevelStorageManager_levelStorage = null; nPs_LevelStorageManager_levelStorage = null;
return; return;
case 2: case 2:

File diff suppressed because one or more lines are too long

View File

@ -25,7 +25,7 @@ public class LevelStorageManager {
} }
} }
if(levelStorage.tagMap.size() == 0) { if(levelStorage.tagMap == null || levelStorage.tagMap.size() == 0) {
levelStorage = null; levelStorage = null;
} }
} }
@ -34,7 +34,7 @@ public class LevelStorageManager {
ByteArrayOutputStream s = new ByteArrayOutputStream(); ByteArrayOutputStream s = new ByteArrayOutputStream();
NBTBase.writeTag(levelStorage, new DataOutputStream(s)); NBTBase.writeTag(levelStorage, new DataOutputStream(s));
GL11.writeFile("/saves/level1.dat", s.toByteArray()); GL11.writeFile("/saves/level1.dat", s.toByteArray());
if(levelStorage.tagMap.size() == 0) { if(levelStorage.tagMap == null || levelStorage.tagMap.size() == 0) {
levelStorage = null; levelStorage = null;
} }
} }