Java Code Examples for net.minecraft.world.WorldSavedData

The following are top voted examples for showing how to use net.minecraft.world.WorldSavedData. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: DecompiledMinecraft   File: MapStorage.java   View source code 6 votes vote down vote up
/**
 * Saves the given MapDataBase to disk.
 */
private void saveData(WorldSavedData p_75747_1_)
{
    if (this.saveHandler != null)
    {
        try
        {
            File file1 = this.saveHandler.getMapFileFromName(p_75747_1_.mapName);

            if (file1 != null)
            {
                NBTTagCompound nbttagcompound = new NBTTagCompound();
                p_75747_1_.writeToNBT(nbttagcompound);
                NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                nbttagcompound1.setTag("data", nbttagcompound);
                FileOutputStream fileoutputstream = new FileOutputStream(file1);
                CompressedStreamTools.writeCompressed(nbttagcompound1, fileoutputstream);
                fileoutputstream.close();
            }
        }
        catch (Exception exception)
        {
            exception.printStackTrace();
        }
    }
}
 
Example 2
Project: DecompiledMinecraft   File: MapStorage.java   View source code 6 votes vote down vote up
/**
 * Saves the given MapDataBase to disk.
 */
private void saveData(WorldSavedData p_75747_1_)
{
    if (this.saveHandler != null)
    {
        try
        {
            File file1 = this.saveHandler.getMapFileFromName(p_75747_1_.mapName);

            if (file1 != null)
            {
                NBTTagCompound nbttagcompound = new NBTTagCompound();
                p_75747_1_.writeToNBT(nbttagcompound);
                NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                nbttagcompound1.setTag("data", nbttagcompound);
                FileOutputStream fileoutputstream = new FileOutputStream(file1);
                CompressedStreamTools.writeCompressed(nbttagcompound1, fileoutputstream);
                fileoutputstream.close();
            }
        }
        catch (Exception exception)
        {
            exception.printStackTrace();
        }
    }
}
 
Example 3
Project: BaseClient   File: MapStorage.java   View source code 6 votes vote down vote up
/**
 * Saves the given MapDataBase to disk.
 */
private void saveData(WorldSavedData p_75747_1_)
{
    if (this.saveHandler != null)
    {
        try
        {
            File file1 = this.saveHandler.getMapFileFromName(p_75747_1_.mapName);

            if (file1 != null)
            {
                NBTTagCompound nbttagcompound = new NBTTagCompound();
                p_75747_1_.writeToNBT(nbttagcompound);
                NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                nbttagcompound1.setTag("data", nbttagcompound);
                FileOutputStream fileoutputstream = new FileOutputStream(file1);
                CompressedStreamTools.writeCompressed(nbttagcompound1, fileoutputstream);
                fileoutputstream.close();
            }
        }
        catch (Exception exception)
        {
            exception.printStackTrace();
        }
    }
}
 
Example 4
Project: BaseClient   File: MapStorage.java   View source code 6 votes vote down vote up
/**
 * Saves the given MapDataBase to disk.
 */
private void saveData(WorldSavedData p_75747_1_)
{
    if (this.saveHandler != null)
    {
        try
        {
            File file1 = this.saveHandler.getMapFileFromName(p_75747_1_.mapName);

            if (file1 != null)
            {
                NBTTagCompound nbttagcompound = new NBTTagCompound();
                p_75747_1_.writeToNBT(nbttagcompound);
                NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                nbttagcompound1.setTag("data", nbttagcompound);
                FileOutputStream fileoutputstream = new FileOutputStream(file1);
                CompressedStreamTools.writeCompressed(nbttagcompound1, fileoutputstream);
                fileoutputstream.close();
            }
        }
        catch (Exception exception)
        {
            exception.printStackTrace();
        }
    }
}
 
Example 5
Project: Backmemed   File: MapStorage.java   View source code 6 votes vote down vote up
/**
 * Saves the given MapDataBase to disk.
 */
private void saveData(WorldSavedData data)
{
    if (this.saveHandler != null)
    {
        try
        {
            File file1 = this.saveHandler.getMapFileFromName(data.mapName);

            if (file1 != null)
            {
                NBTTagCompound nbttagcompound = new NBTTagCompound();
                nbttagcompound.setTag("data", data.writeToNBT(new NBTTagCompound()));
                FileOutputStream fileoutputstream = new FileOutputStream(file1);
                CompressedStreamTools.writeCompressed(nbttagcompound, fileoutputstream);
                fileoutputstream.close();
            }
        }
        catch (Exception exception)
        {
            exception.printStackTrace();
        }
    }
}
 
Example 6
Project: CustomWorldGen   File: MapStorage.java   View source code 6 votes vote down vote up
/**
 * Saves the given MapDataBase to disk.
 */
private void saveData(WorldSavedData data)
{
    if (this.saveHandler != null)
    {
        try
        {
            File file1 = this.saveHandler.getMapFileFromName(data.mapName);

            if (file1 != null)
            {
                NBTTagCompound nbttagcompound = new NBTTagCompound();
                nbttagcompound.setTag("data", data.writeToNBT(new NBTTagCompound()));
                FileOutputStream fileoutputstream = new FileOutputStream(file1);
                CompressedStreamTools.writeCompressed(nbttagcompound, fileoutputstream);
                fileoutputstream.close();
            }
        }
        catch (Exception exception)
        {
            exception.printStackTrace();
        }
    }
}
 
Example 7
Project: BetterWithAddons   File: WorldScaleData.java   View source code 6 votes vote down vote up
public static WorldScaleData getInstance(World world)
{
    if (world != null)
    {
        WorldSavedData handler = world.getPerWorldStorage().getOrLoadData(WorldScaleData.class, ID);
        if (handler == null)
        {
            handler = new WorldScaleData();
            world.getPerWorldStorage().setData(ID, handler);
        }
        ((WorldScaleData)handler).worldObj = world;

        return (WorldScaleData) handler;
    }
    return null;
}
 
Example 8
Project: BetterWithAddons   File: TileEntityLegendarium.java   View source code 6 votes vote down vote up
public static LegendariumData getInstance(World world)
{
    if (world != null)
    {
        WorldSavedData handler = world.getPerWorldStorage().getOrLoadData(LegendariumData.class, ID);
        if (handler == null)
        {
            handler = new LegendariumData();
            world.getPerWorldStorage().setData(ID, handler);
        }
        ((LegendariumData)handler).worldObj = world;

        return (LegendariumData) handler;
    }
    return null;
}
 
Example 9
Project: CrystalMod   File: CubeManager.java   View source code 6 votes vote down vote up
public static CubeManager getInstance()
{
	WorldServer world = DimensionManager.getWorld(ModDimensions.CUBE_ID);
	if (world != null)
	{
		WorldSavedData handler = world.getPerWorldStorage().getOrLoadData(CubeManager.class, ID);
		if (handler == null)
		{
			handler = new CubeManager();
			world.getPerWorldStorage().setData(ID, handler);
		}

		return (CubeManager) handler;
	}

	return null;
}
 
Example 10
Project: Resilience-Client-Source   File: MapStorage.java   View source code 6 votes vote down vote up
/**
 * Assigns the given String id to the given MapDataBase, removing any existing ones of the same id.
 */
public void setData(String par1Str, WorldSavedData par2WorldSavedData)
{
    if (par2WorldSavedData == null)
    {
        throw new RuntimeException("Can\'t set null data");
    }
    else
    {
        if (this.loadedDataMap.containsKey(par1Str))
        {
            this.loadedDataList.remove(this.loadedDataMap.remove(par1Str));
        }

        this.loadedDataMap.put(par1Str, par2WorldSavedData);
        this.loadedDataList.add(par2WorldSavedData);
    }
}
 
Example 11
Project: Resilience-Client-Source   File: MapStorage.java   View source code 6 votes vote down vote up
/**
 * Saves the given MapDataBase to disk.
 */
private void saveData(WorldSavedData par1WorldSavedData)
{
    if (this.saveHandler != null)
    {
        try
        {
            File var2 = this.saveHandler.getMapFileFromName(par1WorldSavedData.mapName);

            if (var2 != null)
            {
                NBTTagCompound var3 = new NBTTagCompound();
                par1WorldSavedData.writeToNBT(var3);
                NBTTagCompound var4 = new NBTTagCompound();
                var4.setTag("data", var3);
                FileOutputStream var5 = new FileOutputStream(var2);
                CompressedStreamTools.writeCompressed(var4, var5);
                var5.close();
            }
        }
        catch (Exception var6)
        {
            var6.printStackTrace();
        }
    }
}
 
Example 12
Project: Cauldron   File: MapStorage.java   View source code 6 votes vote down vote up
public void setData(String p_75745_1_, WorldSavedData p_75745_2_)
{
    if (p_75745_2_ == null)
    {
        throw new RuntimeException("Can\'t set null data");
    }
    else
    {
        if (this.loadedDataMap.containsKey(p_75745_1_))
        {
            this.loadedDataList.remove(this.loadedDataMap.remove(p_75745_1_));
        }

        this.loadedDataMap.put(p_75745_1_, p_75745_2_);
        this.loadedDataList.add(p_75745_2_);
    }
}
 
Example 13
Project: Cauldron   File: MapStorage.java   View source code 6 votes vote down vote up
private void saveData(WorldSavedData p_75747_1_)
{
    if (this.saveHandler != null)
    {
        try
        {
            File file1 = this.saveHandler.getMapFileFromName(p_75747_1_.mapName);

            if (file1 != null)
            {
                NBTTagCompound nbttagcompound = new NBTTagCompound();
                p_75747_1_.writeToNBT(nbttagcompound);
                NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                nbttagcompound1.setTag("data", nbttagcompound);
                FileOutputStream fileoutputstream = new FileOutputStream(file1);
                CompressedStreamTools.writeCompressed(nbttagcompound1, fileoutputstream);
                fileoutputstream.close();
            }
        }
        catch (Exception exception)
        {
            exception.printStackTrace();
        }
    }
}
 
Example 14
Project: Cauldron   File: MapStorage.java   View source code 6 votes vote down vote up
public void setData(String p_75745_1_, WorldSavedData p_75745_2_)
{
    if (p_75745_2_ == null)
    {
        throw new RuntimeException("Can\'t set null data");
    }
    else
    {
        if (this.loadedDataMap.containsKey(p_75745_1_))
        {
            this.loadedDataList.remove(this.loadedDataMap.remove(p_75745_1_));
        }

        this.loadedDataMap.put(p_75745_1_, p_75745_2_);
        this.loadedDataList.add(p_75745_2_);
    }
}
 
Example 15
Project: Cauldron   File: MapStorage.java   View source code 6 votes vote down vote up
private void saveData(WorldSavedData p_75747_1_)
{
    if (this.saveHandler != null)
    {
        try
        {
            File file1 = this.saveHandler.getMapFileFromName(p_75747_1_.mapName);

            if (file1 != null)
            {
                NBTTagCompound nbttagcompound = new NBTTagCompound();
                p_75747_1_.writeToNBT(nbttagcompound);
                NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                nbttagcompound1.setTag("data", nbttagcompound);
                FileOutputStream fileoutputstream = new FileOutputStream(file1);
                CompressedStreamTools.writeCompressed(nbttagcompound1, fileoutputstream);
                fileoutputstream.close();
            }
        }
        catch (Exception exception)
        {
            exception.printStackTrace();
        }
    }
}
 
Example 16
Project: RuneCraftery   File: MapStorage.java   View source code 6 votes vote down vote up
private void func_75747_a(WorldSavedData p_75747_1_) {
   if(this.field_75751_a != null) {
      try {
         File var2 = this.field_75751_a.func_75758_b(p_75747_1_.field_76190_i);
         if(var2 != null) {
            NBTTagCompound var3 = new NBTTagCompound();
            p_75747_1_.func_76187_b(var3);
            NBTTagCompound var4 = new NBTTagCompound();
            var4.func_74766_a("data", var3);
            FileOutputStream var5 = new FileOutputStream(var2);
            CompressedStreamTools.func_74799_a(var4, var5);
            var5.close();
         }
      } catch (Exception var6) {
         var6.printStackTrace();
      }

   }
}
 
Example 17
Project: RuneCraftery   File: MapStorage.java   View source code 6 votes vote down vote up
/**
 * Assigns the given String id to the given MapDataBase, removing any existing ones of the same id.
 */
public void setData(String par1Str, WorldSavedData par2WorldSavedData)
{
    if (par2WorldSavedData == null)
    {
        throw new RuntimeException("Can\'t set null data");
    }
    else
    {
        if (this.loadedDataMap.containsKey(par1Str))
        {
            this.loadedDataList.remove(this.loadedDataMap.remove(par1Str));
        }

        this.loadedDataMap.put(par1Str, par2WorldSavedData);
        this.loadedDataList.add(par2WorldSavedData);
    }
}
 
Example 18
Project: RuneCraftery   File: MapStorage.java   View source code 6 votes vote down vote up
/**
 * Saves the given MapDataBase to disk.
 */
private void saveData(WorldSavedData par1WorldSavedData)
{
    if (this.saveHandler != null)
    {
        try
        {
            File file1 = this.saveHandler.getMapFileFromName(par1WorldSavedData.mapName);

            if (file1 != null)
            {
                NBTTagCompound nbttagcompound = new NBTTagCompound();
                par1WorldSavedData.writeToNBT(nbttagcompound);
                NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                nbttagcompound1.setCompoundTag("data", nbttagcompound);
                FileOutputStream fileoutputstream = new FileOutputStream(file1);
                CompressedStreamTools.writeCompressed(nbttagcompound1, fileoutputstream);
                fileoutputstream.close();
            }
        }
        catch (Exception exception)
        {
            exception.printStackTrace();
        }
    }
}
 
Example 19
Project: BetterNutritionMod   File: MapStorage.java   View source code 6 votes vote down vote up
/**
 * Assigns the given String id to the given MapDataBase, removing any existing ones of the same id.
 */
public void setData(String par1Str, WorldSavedData par2WorldSavedData)
{
    if (par2WorldSavedData == null)
    {
        throw new RuntimeException("Can\'t set null data");
    }
    else
    {
        if (this.loadedDataMap.containsKey(par1Str))
        {
            this.loadedDataList.remove(this.loadedDataMap.remove(par1Str));
        }

        this.loadedDataMap.put(par1Str, par2WorldSavedData);
        this.loadedDataList.add(par2WorldSavedData);
    }
}
 
Example 20
Project: BetterNutritionMod   File: MapStorage.java   View source code 6 votes vote down vote up
/**
 * Saves the given MapDataBase to disk.
 */
private void saveData(WorldSavedData par1WorldSavedData)
{
    if (this.saveHandler != null)
    {
        try
        {
            File file1 = this.saveHandler.getMapFileFromName(par1WorldSavedData.mapName);

            if (file1 != null)
            {
                NBTTagCompound nbttagcompound = new NBTTagCompound();
                par1WorldSavedData.writeToNBT(nbttagcompound);
                NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                nbttagcompound1.setCompoundTag("data", nbttagcompound);
                FileOutputStream fileoutputstream = new FileOutputStream(file1);
                CompressedStreamTools.writeCompressed(nbttagcompound1, fileoutputstream);
                fileoutputstream.close();
            }
        }
        catch (Exception exception)
        {
            exception.printStackTrace();
        }
    }
}
 
Example 21
Project: DecompiledMinecraft   File: MapStorage.java   View source code 5 votes vote down vote up
/**
 * Assigns the given String id to the given MapDataBase, removing any existing ones of the same id.
 */
public void setData(String dataIdentifier, WorldSavedData data)
{
    if (this.loadedDataMap.containsKey(dataIdentifier))
    {
        this.loadedDataList.remove(this.loadedDataMap.remove(dataIdentifier));
    }

    this.loadedDataMap.put(dataIdentifier, data);
    this.loadedDataList.add(data);
}
 
Example 22
Project: DecompiledMinecraft   File: MapStorage.java   View source code 5 votes vote down vote up
/**
 * Saves all dirty loaded MapDataBases to disk.
 */
public void saveAllData()
{
    for (int i = 0; i < this.loadedDataList.size(); ++i)
    {
        WorldSavedData worldsaveddata = (WorldSavedData)this.loadedDataList.get(i);

        if (worldsaveddata.isDirty())
        {
            this.saveData(worldsaveddata);
            worldsaveddata.setDirty(false);
        }
    }
}
 
Example 23
Project: DecompiledMinecraft   File: MapStorage.java   View source code 5 votes vote down vote up
/**
 * Assigns the given String id to the given MapDataBase, removing any existing ones of the same id.
 */
public void setData(String dataIdentifier, WorldSavedData data)
{
    if (this.loadedDataMap.containsKey(dataIdentifier))
    {
        this.loadedDataList.remove(this.loadedDataMap.remove(dataIdentifier));
    }

    this.loadedDataMap.put(dataIdentifier, data);
    this.loadedDataList.add(data);
}
 
Example 24
Project: DecompiledMinecraft   File: MapStorage.java   View source code 5 votes vote down vote up
/**
 * Saves all dirty loaded MapDataBases to disk.
 */
public void saveAllData()
{
    for (int i = 0; i < this.loadedDataList.size(); ++i)
    {
        WorldSavedData worldsaveddata = (WorldSavedData)this.loadedDataList.get(i);

        if (worldsaveddata.isDirty())
        {
            this.saveData(worldsaveddata);
            worldsaveddata.setDirty(false);
        }
    }
}
 
Example 25
Project: BaseClient   File: MapStorage.java   View source code 5 votes vote down vote up
/**
 * Assigns the given String id to the given MapDataBase, removing any existing ones of the same id.
 */
public void setData(String dataIdentifier, WorldSavedData data)
{
    if (this.loadedDataMap.containsKey(dataIdentifier))
    {
        this.loadedDataList.remove(this.loadedDataMap.remove(dataIdentifier));
    }

    this.loadedDataMap.put(dataIdentifier, data);
    this.loadedDataList.add(data);
}
 
Example 26
Project: BaseClient   File: MapStorage.java   View source code 5 votes vote down vote up
/**
 * Saves all dirty loaded MapDataBases to disk.
 */
public void saveAllData()
{
    for (int i = 0; i < this.loadedDataList.size(); ++i)
    {
        WorldSavedData worldsaveddata = (WorldSavedData)this.loadedDataList.get(i);

        if (worldsaveddata.isDirty())
        {
            this.saveData(worldsaveddata);
            worldsaveddata.setDirty(false);
        }
    }
}
 
Example 27
Project: BaseClient   File: MapStorage.java   View source code 5 votes vote down vote up
/**
 * Assigns the given String id to the given MapDataBase, removing any existing ones of the same id.
 */
public void setData(String dataIdentifier, WorldSavedData data)
{
    if (this.loadedDataMap.containsKey(dataIdentifier))
    {
        this.loadedDataList.remove(this.loadedDataMap.remove(dataIdentifier));
    }

    this.loadedDataMap.put(dataIdentifier, data);
    this.loadedDataList.add(data);
}
 
Example 28
Project: BaseClient   File: MapStorage.java   View source code 5 votes vote down vote up
/**
 * Saves all dirty loaded MapDataBases to disk.
 */
public void saveAllData()
{
    for (int i = 0; i < this.loadedDataList.size(); ++i)
    {
        WorldSavedData worldsaveddata = (WorldSavedData)this.loadedDataList.get(i);

        if (worldsaveddata.isDirty())
        {
            this.saveData(worldsaveddata);
            worldsaveddata.setDirty(false);
        }
    }
}
 
Example 29
Project: Backmemed   File: SaveDataMemoryStorage.java   View source code 5 votes vote down vote up
@Nullable

    /**
     * Loads an existing MapDataBase corresponding to the given id from disk, instantiating the given Class, or returns
     * null if none such file exists.
     */
    public WorldSavedData getOrLoadData(Class <? extends WorldSavedData > clazz, String dataIdentifier)
    {
        return (WorldSavedData)this.loadedDataMap.get(dataIdentifier);
    }
 
Example 30
Project: Backmemed   File: MapStorage.java   View source code 5 votes vote down vote up
/**
 * Assigns the given String id to the given MapDataBase, removing any existing ones of the same id.
 */
public void setData(String dataIdentifier, WorldSavedData data)
{
    if (this.loadedDataMap.containsKey(dataIdentifier))
    {
        this.loadedDataList.remove(this.loadedDataMap.remove(dataIdentifier));
    }

    this.loadedDataMap.put(dataIdentifier, data);
    this.loadedDataList.add(data);
}
 
Example 31
Project: Backmemed   File: MapStorage.java   View source code 5 votes vote down vote up
/**
 * Saves all dirty loaded MapDataBases to disk.
 */
public void saveAllData()
{
    for (int i = 0; i < this.loadedDataList.size(); ++i)
    {
        WorldSavedData worldsaveddata = (WorldSavedData)this.loadedDataList.get(i);

        if (worldsaveddata.isDirty())
        {
            this.saveData(worldsaveddata);
            worldsaveddata.setDirty(false);
        }
    }
}
 
Example 32
Project: CustomWorldGen   File: MapStorage.java   View source code 5 votes vote down vote up
/**
 * Assigns the given String id to the given MapDataBase, removing any existing ones of the same id.
 */
public void setData(String dataIdentifier, WorldSavedData data)
{
    if (this.loadedDataMap.containsKey(dataIdentifier))
    {
        this.loadedDataList.remove(this.loadedDataMap.remove(dataIdentifier));
    }

    this.loadedDataMap.put(dataIdentifier, data);
    this.loadedDataList.add(data);
}
 
Example 33
Project: CustomWorldGen   File: MapStorage.java   View source code 5 votes vote down vote up
/**
 * Saves all dirty loaded MapDataBases to disk.
 */
public void saveAllData()
{
    for (int i = 0; i < this.loadedDataList.size(); ++i)
    {
        WorldSavedData worldsaveddata = (WorldSavedData)this.loadedDataList.get(i);

        if (worldsaveddata.isDirty())
        {
            this.saveData(worldsaveddata);
            worldsaveddata.setDirty(false);
        }
    }
}
 
Example 34
Project: BetterWithAddons   File: TerratorialData.java   View source code 5 votes vote down vote up
public static TerratorialData getInstance(World world)
{
    if (world != null)
    {
        WorldSavedData handler = world.getPerWorldStorage().getOrLoadData(TerratorialData.class, ID);
        if (handler == null)
        {
            handler = new TerratorialData();
            world.getPerWorldStorage().setData(ID, handler);
        }

        return (TerratorialData) handler;
    }
    return null;
}
 
Example 35
Project: Resilience-Client-Source   File: MapStorage.java   View source code 5 votes vote down vote up
/**
 * Saves all dirty loaded MapDataBases to disk.
 */
public void saveAllData()
{
    for (int var1 = 0; var1 < this.loadedDataList.size(); ++var1)
    {
        WorldSavedData var2 = (WorldSavedData)this.loadedDataList.get(var1);

        if (var2.isDirty())
        {
            this.saveData(var2);
            var2.setDirty(false);
        }
    }
}
 
Example 36
Project: Cauldron   File: MapStorage.java   View source code 5 votes vote down vote up
public void saveAllData()
{
    for (int i = 0; i < this.loadedDataList.size(); ++i)
    {
        WorldSavedData worldsaveddata = (WorldSavedData)this.loadedDataList.get(i);

        if (worldsaveddata.isDirty())
        {
            this.saveData(worldsaveddata);
            worldsaveddata.setDirty(false);
        }
    }
}
 
Example 37
Project: Cauldron   File: MapStorage.java   View source code 5 votes vote down vote up
public void saveAllData()
{
    for (int i = 0; i < this.loadedDataList.size(); ++i)
    {
        WorldSavedData worldsaveddata = (WorldSavedData)this.loadedDataList.get(i);

        if (worldsaveddata.isDirty())
        {
            this.saveData(worldsaveddata);
            worldsaveddata.setDirty(false);
        }
    }
}
 
Example 38
Project: RuneCraftery   File: MapStorage.java   View source code 5 votes vote down vote up
public void func_75745_a(String p_75745_1_, WorldSavedData p_75745_2_) {
   if(p_75745_2_ == null) {
      throw new RuntimeException("Can\'t set null data");
   } else {
      if(this.field_75749_b.containsKey(p_75745_1_)) {
         this.field_75750_c.remove(this.field_75749_b.remove(p_75745_1_));
      }

      this.field_75749_b.put(p_75745_1_, p_75745_2_);
      this.field_75750_c.add(p_75745_2_);
   }
}
 
Example 39
Project: RuneCraftery   File: MapStorage.java   View source code 5 votes vote down vote up
public void func_75744_a() {
   for(int var1 = 0; var1 < this.field_75750_c.size(); ++var1) {
      WorldSavedData var2 = (WorldSavedData)this.field_75750_c.get(var1);
      if(var2.func_76188_b()) {
         this.func_75747_a(var2);
         var2.func_76186_a(false);
      }
   }

}
 
Example 40
Project: RuneCraftery   File: MapStorage.java   View source code 5 votes vote down vote up
/**
 * Saves all dirty loaded MapDataBases to disk.
 */
public void saveAllData()
{
    for (int i = 0; i < this.loadedDataList.size(); ++i)
    {
        WorldSavedData worldsaveddata = (WorldSavedData)this.loadedDataList.get(i);

        if (worldsaveddata.isDirty())
        {
            this.saveData(worldsaveddata);
            worldsaveddata.setDirty(false);
        }
    }
}