Initial Commit

This commit is contained in:
MrHua269
2026-07-09 14:36:37 +08:00
commit de6a4944e6
243 changed files with 21326 additions and 0 deletions
@@ -0,0 +1,44 @@
package moe.monnairealms.camellia.data;
import ca.spottedleaf.moonrise.patches.chunk_system.storage.ChunkSystemRegionFile;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.level.ChunkPos;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.file.Path;
public interface RegionFile extends ChunkSystemRegionFile, AutoCloseable {
Path getPath();
DataInputStream getChunkDataInputStream(ChunkPos pos) throws IOException;
boolean doesChunkExist(ChunkPos pos) throws Exception;
DataOutputStream getChunkDataOutputStream(ChunkPos pos) throws IOException;
void flush() throws IOException;
void clear(ChunkPos pos) throws IOException;
boolean hasChunk(ChunkPos pos);
void close() throws IOException;
void write(ChunkPos pos, ByteBuffer buf) throws IOException;
CompoundTag getOversizedData(int x, int z) throws IOException;
boolean isOversized(int x, int z);
boolean recalculateHeader() throws IOException;
void setOversized(int x, int z, boolean oversized) throws IOException;
default int getRecalculateCount() {
return 0;
} // Luminol - Configurable region file format
}