Example #1
0
  private void updateTagCompound(
      NBTTagCompound par1NBTTagCompound, NBTTagCompound par2NBTTagCompound) {
    par1NBTTagCompound.setLong("RandomSeed", this.randomSeed);
    par1NBTTagCompound.setString("generatorName", this.terrainType.getWorldTypeName());
    par1NBTTagCompound.setInteger("generatorVersion", this.terrainType.getGeneratorVersion());
    par1NBTTagCompound.setString("generatorOptions", this.generatorOptions);
    par1NBTTagCompound.setInteger("GameType", this.theGameType.getID());
    par1NBTTagCompound.setBoolean("MapFeatures", this.mapFeaturesEnabled);
    par1NBTTagCompound.setInteger("SpawnX", this.spawnX);
    par1NBTTagCompound.setInteger("SpawnY", this.spawnY);
    par1NBTTagCompound.setInteger("SpawnZ", this.spawnZ);
    par1NBTTagCompound.setLong("Time", this.totalTime);
    par1NBTTagCompound.setLong("DayTime", this.worldTime);
    par1NBTTagCompound.setLong("SizeOnDisk", this.sizeOnDisk);
    par1NBTTagCompound.setLong("LastPlayed", MinecraftServer.func_130071_aq());
    par1NBTTagCompound.setString("LevelName", this.levelName);
    par1NBTTagCompound.setInteger("version", this.saveVersion);
    par1NBTTagCompound.setInteger("rainTime", this.rainTime);
    par1NBTTagCompound.setBoolean("raining", this.raining);
    par1NBTTagCompound.setInteger("thunderTime", this.thunderTime);
    par1NBTTagCompound.setBoolean("thundering", this.thundering);
    par1NBTTagCompound.setBoolean("hardcore", this.hardcore);
    par1NBTTagCompound.setBoolean("allowCommands", this.allowCommands);
    par1NBTTagCompound.setBoolean("initialized", this.initialized);
    par1NBTTagCompound.setCompoundTag("GameRules", this.theGameRules.writeGameRulesToNBT());

    if (par2NBTTagCompound != null) {
      par1NBTTagCompound.setCompoundTag("Player", par2NBTTagCompound);
    }
  }
Example #2
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);
   }
 }
 /** Updates the progress bar on the loading screen to the specified amount. Args: loadProgress */
 public void setLoadingProgress(int par1) {
   if (MinecraftServer.func_130071_aq() - this.field_96245_b >= 1000L) {
     this.field_96245_b = MinecraftServer.func_130071_aq();
     this.mcServer.getLogAgent().func_98233_a("Converting... " + par1 + "%");
   }
 }
 public ConvertingProgressUpdate(MinecraftServer par1MinecraftServer) {
   this.mcServer = par1MinecraftServer;
   this.field_96245_b = MinecraftServer.func_130071_aq();
 }