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 |
readLevelData(int levelWidth,
int levelHeight,
int levelLength)
Attempts to read finite data from disk using GZIP compression,
then gets a new LevelDataContainer populated from the loaded finite data.
|
boolean |
writeLevelData(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,
then attempts to write the current finite data to disk using GZIP compression,
and finally returns whether the save was successful.
|
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 boolean writeLevelData(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 readLevelData(int levelWidth, int levelHeight, int levelLength)
levelWidth - The level width.levelHeight - The level height.levelLength - The level length