public class AnvilChunkLoader extends java.lang.Object implements IChunkLoader, IThreadedFileIO
Modifier and Type | Field and Description |
---|---|
java.io.File |
chunkSaveLocation |
private java.util.Set<ChunkPos> |
chunksBeingSaved |
private java.util.Map<ChunkPos,NBTTagCompound> |
chunksToSave |
private DataFixer |
fixer |
private boolean |
flushing |
private static org.apache.logging.log4j.Logger |
LOGGER |
Constructor and Description |
---|
AnvilChunkLoader(java.io.File chunkSaveLocationIn,
DataFixer dataFixerIn) |
Modifier and Type | Method and Description |
---|---|
protected void |
addChunkToPending(ChunkPos pos,
NBTTagCompound compound) |
protected java.lang.Object[] |
checkedReadChunkFromNBT__Async(World worldIn,
int x,
int z,
NBTTagCompound compound) |
protected Chunk |
checkedReadChunkFromNBT(World worldIn,
int x,
int z,
NBTTagCompound compound) |
boolean |
chunkExists(World world,
int x,
int z)
Deprecated.
|
void |
chunkTick() |
protected static Entity |
createEntityFromNBT(NBTTagCompound compound,
World worldIn) |
void |
flush() |
int |
getPendingSaveCount() |
boolean |
isChunkGeneratedAt(int x,
int z) |
java.lang.Object[] |
loadChunk__Async(World worldIn,
int x,
int z) |
Chunk |
loadChunk(World worldIn,
int x,
int z) |
void |
loadEntities(World worldIn,
NBTTagCompound compound,
Chunk chunk) |
static Entity |
readChunkEntity(NBTTagCompound compound,
World worldIn,
Chunk chunkIn) |
private Chunk |
readChunkFromNBT(World worldIn,
NBTTagCompound compound) |
static Entity |
readWorldEntity(NBTTagCompound compound,
World worldIn,
boolean p_186051_2_) |
static Entity |
readWorldEntityPos(NBTTagCompound compound,
World worldIn,
double x,
double y,
double z,
boolean attemptSpawn) |
static void |
registerFixes(DataFixer fixer) |
void |
saveChunk(World worldIn,
Chunk chunkIn) |
void |
saveExtraChunkData(World worldIn,
Chunk chunkIn) |
static void |
spawnEntity(Entity entityIn,
World worldIn) |
private void |
writeChunkData(ChunkPos pos,
NBTTagCompound compound) |
private void |
writeChunkToNBT(Chunk chunkIn,
World worldIn,
NBTTagCompound compound) |
boolean |
writeNextIO() |
private static final org.apache.logging.log4j.Logger LOGGER
private final java.util.Map<ChunkPos,NBTTagCompound> chunksToSave
private final java.util.Set<ChunkPos> chunksBeingSaved
public final java.io.File chunkSaveLocation
private final DataFixer fixer
private boolean flushing
public AnvilChunkLoader(java.io.File chunkSaveLocationIn, DataFixer dataFixerIn)
@Deprecated public boolean chunkExists(World world, int x, int z)
@Nullable public Chunk loadChunk(World worldIn, int x, int z) throws java.io.IOException
loadChunk
in interface IChunkLoader
java.io.IOException
@Nullable public java.lang.Object[] loadChunk__Async(World worldIn, int x, int z) throws java.io.IOException
java.io.IOException
public boolean isChunkGeneratedAt(int x, int z)
isChunkGeneratedAt
in interface IChunkLoader
@Nullable protected Chunk checkedReadChunkFromNBT(World worldIn, int x, int z, NBTTagCompound compound)
@Nullable protected java.lang.Object[] checkedReadChunkFromNBT__Async(World worldIn, int x, int z, NBTTagCompound compound)
public void saveChunk(World worldIn, Chunk chunkIn) throws MinecraftException, java.io.IOException
saveChunk
in interface IChunkLoader
MinecraftException
java.io.IOException
protected void addChunkToPending(ChunkPos pos, NBTTagCompound compound)
public boolean writeNextIO()
writeNextIO
in interface IThreadedFileIO
private void writeChunkData(ChunkPos pos, NBTTagCompound compound) throws java.io.IOException
java.io.IOException
public void saveExtraChunkData(World worldIn, Chunk chunkIn) throws java.io.IOException
saveExtraChunkData
in interface IChunkLoader
java.io.IOException
public void chunkTick()
chunkTick
in interface IChunkLoader
public void flush()
flush
in interface IChunkLoader
public static void registerFixes(DataFixer fixer)
private void writeChunkToNBT(Chunk chunkIn, World worldIn, NBTTagCompound compound)
private Chunk readChunkFromNBT(World worldIn, NBTTagCompound compound)
public void loadEntities(World worldIn, NBTTagCompound compound, Chunk chunk)
@Nullable public static Entity readChunkEntity(NBTTagCompound compound, World worldIn, Chunk chunkIn)
@Nullable public static Entity readWorldEntityPos(NBTTagCompound compound, World worldIn, double x, double y, double z, boolean attemptSpawn)
@Nullable protected static Entity createEntityFromNBT(NBTTagCompound compound, World worldIn)
@Nullable public static Entity readWorldEntity(NBTTagCompound compound, World worldIn, boolean p_186051_2_)
public int getPendingSaveCount()