001package net.minecraft.world.chunk.storage; 002 003import java.io.IOException; 004import net.minecraft.world.MinecraftException; 005import net.minecraft.world.World; 006import net.minecraft.world.chunk.Chunk; 007 008public interface IChunkLoader 009{ 010 /** 011 * Loads the specified(XZ) chunk into the specified world. 012 */ 013 Chunk loadChunk(World world, int i, int j) throws IOException; 014 015 void saveChunk(World world, Chunk chunk) throws MinecraftException, IOException; 016 017 /** 018 * Save extra data associated with this Chunk not normally saved during autosave, only during chunk unload. 019 * Currently unused. 020 */ 021 void saveExtraChunkData(World world, Chunk chunk); 022 023 /** 024 * Called every World.tick() 025 */ 026 void chunkTick(); 027 028 /** 029 * Save extra data not associated with any Chunk. Not saved during autosave, only during world unload. Currently 030 * unused. 031 */ 032 void saveExtraData(); 033}