Heres how my chunk writing works: for(Chunk chunk : world) { // Store chunks in sections…
Rate quality
Private research annotation
Sign in to add a private research label or note.
- User
Heres how my chunk writing works:
for(Chunk chunk : world) { // Store chunks in sections to better distribute data int xSection = (int) Math.floor(chunk.getChunkX() / ResourceReader.CHUNKS_PER_FILE); int ySection = (int) Math.floor(chunk.getChunkY() / ResourceReader.CHUNKS_PER_FILE); int zSection = (int) Math.floor(chunk.getChunkZ() / ResourceReader.CHUNKS_PER_FILE);
code// ~~Append needs to be true for multiple chunks!!!!!!!~~ // but i think were gonna do one chunk per file because file sizes are unpredictable try(RandomAccessFile output = new RandomAccessFile(chunkFolder.getAbsolutePath() + "/" + xSection + " " + ySection + " " + zSection, "rw")) {An unsorted array of chunks needs to be written to individual files. Nearby Chunks are clumped together. Should I only open one RandomAccessfile per chunk section and try to sort the world array, or is this current method of opening the file at the file for each chunk just as fast? Basically Im asking what is slower
- Assistant