001 package net.minecraft.src; 002 003 public abstract class WorldSavedData 004 { 005 /** The name of the map data nbt */ 006 public final String mapName; 007 008 /** Whether this MapDataBase needs saving to disk. */ 009 private boolean dirty; 010 011 public WorldSavedData(String par1Str) 012 { 013 this.mapName = par1Str; 014 } 015 016 /** 017 * reads in data from the NBTTagCompound into this MapDataBase 018 */ 019 public abstract void readFromNBT(NBTTagCompound var1); 020 021 /** 022 * write data to NBTTagCompound from this MapDataBase, similar to Entities and TileEntities 023 */ 024 public abstract void writeToNBT(NBTTagCompound var1); 025 026 /** 027 * Marks this MapDataBase dirty, to be saved to disk when the level next saves. 028 */ 029 public void markDirty() 030 { 031 this.setDirty(true); 032 } 033 034 /** 035 * Sets the dirty state of this MapDataBase, whether it needs saving to disk. 036 */ 037 public void setDirty(boolean par1) 038 { 039 this.dirty = par1; 040 } 041 042 /** 043 * Whether this MapDataBase needs saving to disk. 044 */ 045 public boolean isDirty() 046 { 047 return this.dirty; 048 } 049 }