public class FiniteDataHandler
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FILE_NAME |
| Constructor and Description |
|---|
FiniteDataHandler(net.minecraft.world.World world,
FiniteChunkSource finiteChunkSource)
Constructs a new finite data handler.
|
| Modifier and Type | Method and Description |
|---|---|
FiniteChunkSource.LevelDataContainer |
getLevelData(int levelWidth,
int levelHeight,
int levelLength)
Gets a new LevelDataContainer populated from the loaded finite data.
|
void |
readFromDisk()
Attempts to read finite data from disk.
|
void |
setLevelData(byte[] levelData,
com.google.common.collect.BiMap<java.lang.Byte,java.lang.String> levelMap)
Sets given byte level data array into the finite data container.
|
void |
writeToDisk()
Attempts to write the current finite data to disk.
|
public static final java.lang.String FILE_NAME
public FiniteDataHandler(net.minecraft.world.World world,
FiniteChunkSource finiteChunkSource)
world - The world object.finiteChunkSource - The Finite chunk source.public void setLevelData(byte[] levelData,
com.google.common.collect.BiMap<java.lang.Byte,java.lang.String> levelMap)
levelData - Level byte array provided by FiniteChunkSource object.levelMap - Level byte-string id map.public FiniteChunkSource.LevelDataContainer getLevelData(int levelWidth, int levelHeight, int levelLength)
levelWidth - The level width.levelHeight - The level height.levelLength - The level lengthpublic void writeToDisk()
throws java.io.IOException
java.io.IOException - if the finite data can't be written to diskpublic void readFromDisk()
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException - if the finite data can't be read from diskjava.lang.ClassNotFoundException - if the finite data class is not found (when would this happen?)