public class ChunkProviderServer extends java.lang.Object implements IChunkProvider
Modifier and Type | Field and Description |
---|---|
IChunkGenerator |
chunkGenerator |
IChunkLoader |
chunkLoader |
private java.util.Set<java.lang.Long> |
droppedChunksSet |
it.unimi.dsi.fastutil.longs.Long2ObjectMap<Chunk> |
id2ChunkMap |
private java.util.Set<java.lang.Long> |
loadingChunks |
private static org.apache.logging.log4j.Logger |
LOGGER |
WorldServer |
world |
Constructor and Description |
---|
ChunkProviderServer(WorldServer worldObjIn,
IChunkLoader chunkLoaderIn,
IChunkGenerator chunkGeneratorIn) |
Modifier and Type | Method and Description |
---|---|
boolean |
canSave() |
boolean |
chunkExists(int x,
int z) |
void |
flushToDisk() |
Chunk |
getLoadedChunk(int x,
int z) |
int |
getLoadedChunkCount() |
java.util.Collection<Chunk> |
getLoadedChunks() |
BlockPos |
getNearestStructurePos(World worldIn,
java.lang.String structureName,
BlockPos position,
boolean findUnexplored) |
java.util.List<Biome.SpawnListEntry> |
getPossibleCreatures(EnumCreatureType creatureType,
BlockPos pos) |
boolean |
isChunkGeneratedAt(int x,
int z) |
boolean |
isInsideStructure(World worldIn,
java.lang.String structureName,
BlockPos pos) |
Chunk |
loadChunk(int x,
int z) |
Chunk |
loadChunk(int x,
int z,
java.lang.Runnable runnable) |
private Chunk |
loadChunkFromFile(int x,
int z) |
java.lang.String |
makeString() |
Chunk |
provideChunk(int x,
int z) |
void |
queueUnload(Chunk chunkIn) |
void |
queueUnloadAll() |
private void |
saveChunkData(Chunk chunkIn) |
private void |
saveChunkExtraData(Chunk chunkIn) |
boolean |
saveChunks(boolean all) |
boolean |
tick() |
private static final org.apache.logging.log4j.Logger LOGGER
private final java.util.Set<java.lang.Long> droppedChunksSet
public final IChunkGenerator chunkGenerator
public final IChunkLoader chunkLoader
public final it.unimi.dsi.fastutil.longs.Long2ObjectMap<Chunk> id2ChunkMap
public final WorldServer world
private final java.util.Set<java.lang.Long> loadingChunks
public ChunkProviderServer(WorldServer worldObjIn, IChunkLoader chunkLoaderIn, IChunkGenerator chunkGeneratorIn)
public java.util.Collection<Chunk> getLoadedChunks()
public void queueUnload(Chunk chunkIn)
public void queueUnloadAll()
@Nullable public Chunk getLoadedChunk(int x, int z)
getLoadedChunk
in interface IChunkProvider
@Nullable public Chunk loadChunk(int x, int z)
@Nullable public Chunk loadChunk(int x, int z, @Nullable java.lang.Runnable runnable)
public Chunk provideChunk(int x, int z)
provideChunk
in interface IChunkProvider
@Nullable private Chunk loadChunkFromFile(int x, int z)
private void saveChunkExtraData(Chunk chunkIn)
private void saveChunkData(Chunk chunkIn)
public boolean saveChunks(boolean all)
public void flushToDisk()
public boolean tick()
tick
in interface IChunkProvider
public boolean canSave()
public java.lang.String makeString()
makeString
in interface IChunkProvider
public java.util.List<Biome.SpawnListEntry> getPossibleCreatures(EnumCreatureType creatureType, BlockPos pos)
@Nullable public BlockPos getNearestStructurePos(World worldIn, java.lang.String structureName, BlockPos position, boolean findUnexplored)
public boolean isInsideStructure(World worldIn, java.lang.String structureName, BlockPos pos)
public int getLoadedChunkCount()
public boolean chunkExists(int x, int z)
public boolean isChunkGeneratedAt(int x, int z)
isChunkGeneratedAt
in interface IChunkProvider