WorldSavedData .java

net.minecraft.world.WorldSavedData (class): members: setDirty, mapName, isDirty, dirty, markDirty, readFromNBT, writeToNBT. imports: NBTTagCompound.

net.minecraft.worldclass52 linescommon1.1 KB

API Surface (3)

void markDirty()
void setDirty(boolean isDirty)
boolean isDirty()

Fields & Constants (2)

mapName
dirty

Code Graph: Dependencies (1)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

WorldSavedData.java52 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.world;
2
3
import net.minecraft.nbt.NBTTagCompound;
4
5
public abstract class WorldSavedData
6
{
7
    /** The name of the map data nbt */
8
    public final String mapName;
9
10
    /** Whether this MapDataBase needs saving to disk. */
11
    private boolean dirty;
12
13
    public WorldSavedData(String name)
14
    {
15
        this.mapName = name;
16
    }
17
18
    /**
19
     * reads in data from the NBTTagCompound into this MapDataBase
20
     */
21
    public abstract void readFromNBT(NBTTagCompound nbt);
22
23
    /**
24
     * write data to NBTTagCompound from this MapDataBase, similar to Entities and TileEntities
25
     */
26
    public abstract void writeToNBT(NBTTagCompound nbt);
27
28
    /**
29
     * Marks this MapDataBase dirty, to be saved to disk when the level next saves.
30
     */
31
    public void markDirty()
32
    {
33
        this.setDirty(true);
34
    }
35
36
    /**
37
     * Sets the dirty state of this MapDataBase, whether it needs saving to disk.
38
     */
39
    public void setDirty(boolean isDirty)
40
    {
41
        this.dirty = isDirty;
42
    }
43
44
    /**
45
     * Whether this MapDataBase needs saving to disk.
46
     */
47
    public boolean isDirty()
48
    {
49
        return this.dirty;
50
    }
51
}
52

Deobfuscated MCP 1.8.9 source of WorldSavedData from Marcelektro/MavenMCP-1.8.9 (net/minecraft/world/WorldSavedData.java), stored verbatim.