use of org.asassecreations.voxelgame.world.chunk.Chunk in project Voxel_Game by ASasseCreations.
the class ChunkSaveQueue method contains.
private static final boolean contains(final Chunk chunk) {
if (chunk == null)
return false;
for (int i = 0; i < LIST.size(); i++) {
final ChunkSaveQueue queue = LIST.get(i);
if (queue == null)
continue;
final Chunk temp = queue.chunk;
if (temp == null)
continue;
if (temp.x == chunk.x && temp.z == chunk.z)
return true;
}
return false;
}
use of org.asassecreations.voxelgame.world.chunk.Chunk in project Voxel_Game by ASasseCreations.
the class ChunkSaveQueue method queue.
public static final void queue() {
for (int i = 0; i < LIST.size(); i++) {
final ChunkSaveQueue queue = LIST.get(i);
if (queue == null)
continue;
final Chunk chunk = queue.chunk;
if (chunk == null)
continue;
if (chunk.operation == null)
chunk.operation = ChunkOperation.SAVING;
if (chunk.save())
LIST.remove(queue);
}
}
Aggregations