Example #1
0
 private void updateTagCompound(
     NBTTagCompound par1NBTTagCompound, NBTTagCompound par2NBTTagCompound) {
   par1NBTTagCompound.setLong("RandomSeed", randomSeed);
   par1NBTTagCompound.setString("generatorName", terrainType.getWorldTypeName());
   par1NBTTagCompound.setInteger("generatorVersion", terrainType.getGeneratorVersion());
   par1NBTTagCompound.setString("generatorOptions", generatorOptions);
   par1NBTTagCompound.setInteger("GameType", theGameType.getID());
   par1NBTTagCompound.setBoolean("MapFeatures", mapFeaturesEnabled);
   par1NBTTagCompound.setInteger("SpawnX", spawnX);
   par1NBTTagCompound.setInteger("SpawnY", spawnY);
   par1NBTTagCompound.setInteger("SpawnZ", spawnZ);
   par1NBTTagCompound.setLong("Time", totalTime);
   par1NBTTagCompound.setLong("DayTime", worldTime);
   par1NBTTagCompound.setLong("SizeOnDisk", sizeOnDisk);
   par1NBTTagCompound.setLong("LastPlayed", MinecraftServer.func_130071_aq());
   par1NBTTagCompound.setString("LevelName", levelName);
   par1NBTTagCompound.setInteger("version", saveVersion);
   par1NBTTagCompound.setInteger("rainTime", rainTime);
   par1NBTTagCompound.setBoolean("raining", raining);
   par1NBTTagCompound.setInteger("thunderTime", thunderTime);
   par1NBTTagCompound.setBoolean("thundering", thundering);
   par1NBTTagCompound.setBoolean("hardcore", hardcore);
   par1NBTTagCompound.setBoolean("allowCommands", allowCommands);
   par1NBTTagCompound.setBoolean("initialized", initialized);
   par1NBTTagCompound.setCompoundTag("GameRules", theGameRules.writeGameRulesToNBT());
   if (nbxlite && useNBXlite) {
     NBTTagCompound nbxliteTag = new NBTTagCompound();
     nbxliteTag.setInteger("Version", NBXLITE_INFO_VERSION);
     nbxliteTag.setString("Generator", ODNBXlite.getGenName(mapGen, mapGenExtra, snowCovered));
     nbxliteTag.setString("Flags", flags);
     NBTTagCompound structuresTag = new NBTTagCompound();
     for (int i = 0; i < structures.length; i++) {
       structuresTag.setBoolean(ODNBXlite.STRUCTURES[i], structures[i]);
     }
     nbxliteTag.setCompoundTag("Structures", structuresTag);
     NBTTagCompound themeTag = new NBTTagCompound();
     themeTag.setInteger("Generation", mapTheme);
     themeTag.setFloat("CloudHeight", cloudheight);
     themeTag.setInteger("SkyColor", skycolor);
     themeTag.setInteger("FogColor", fogcolor);
     themeTag.setInteger("CloudColor", cloudcolor);
     themeTag.setInteger("SkyBrightness", skybrightness);
     nbxliteTag.setCompoundTag("Theme", themeTag);
     if (mapGen == ODNBXlite.GEN_BIOMELESS
         && (mapGenExtra == ODNBXlite.FEATURES_INDEV
             || mapGenExtra == ODNBXlite.FEATURES_CLASSIC)) {
       NBTTagCompound finiteTag = new NBTTagCompound();
       finiteTag.setInteger("X", indevX);
       finiteTag.setInteger("Y", indevY);
       finiteTag.setInteger("Z", indevZ);
       finiteTag.setInteger("Type", mapType);
       finiteTag.setInteger("SurroundingGroundType", ODNBXlite.SurrGroundType);
       finiteTag.setInteger("SurroundingWaterType", ODNBXlite.SurrWaterType);
       finiteTag.setInteger("SurroundingGroundHeight", ODNBXlite.SurrGroundHeight);
       finiteTag.setInteger("SurroundingWaterHeight", ODNBXlite.SurrWaterHeight);
       nbxliteTag.setCompoundTag("Indev", finiteTag);
     }
     par1NBTTagCompound.setCompoundTag("NBXlite", nbxliteTag);
   }
   if (par2NBTTagCompound != null) {
     par1NBTTagCompound.setCompoundTag("Player", par2NBTTagCompound);
   }
 }