|
@@ -12,7 +12,7 @@ public interface ChunkletManager {
|
|
* @param cz Chunklet Z coordinate that needs to be loaded
|
|
* @param cz Chunklet Z coordinate that needs to be loaded
|
|
* @param world World that the chunklet needs to be loaded in
|
|
* @param world World that the chunklet needs to be loaded in
|
|
*/
|
|
*/
|
|
- public void loadChunklet(int cx, int cy, int cz, World world);
|
|
|
|
|
|
+ void loadChunklet(int cx, int cy, int cz, World world);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Unload a specific chunklet
|
|
* Unload a specific chunklet
|
|
@@ -22,7 +22,7 @@ public interface ChunkletManager {
|
|
* @param cz Chunklet Z coordinate that needs to be unloaded
|
|
* @param cz Chunklet Z coordinate that needs to be unloaded
|
|
* @param world World that the chunklet needs to be unloaded from
|
|
* @param world World that the chunklet needs to be unloaded from
|
|
*/
|
|
*/
|
|
- public void unloadChunklet(int cx, int cy, int cz, World world);
|
|
|
|
|
|
+ void unloadChunklet(int cx, int cy, int cz, World world);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Load a given Chunk's Chunklet data
|
|
* Load a given Chunk's Chunklet data
|
|
@@ -31,7 +31,7 @@ public interface ChunkletManager {
|
|
* @param cz Chunk Z coordinate that is to be loaded
|
|
* @param cz Chunk Z coordinate that is to be loaded
|
|
* @param world World that the Chunk is in
|
|
* @param world World that the Chunk is in
|
|
*/
|
|
*/
|
|
- public void loadChunk(int cx, int cz, World world);
|
|
|
|
|
|
+ void loadChunk(int cx, int cz, World world);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Unload a given Chunk's Chunklet data
|
|
* Unload a given Chunk's Chunklet data
|
|
@@ -40,7 +40,7 @@ public interface ChunkletManager {
|
|
* @param cz Chunk Z coordinate that is to be unloaded
|
|
* @param cz Chunk Z coordinate that is to be unloaded
|
|
* @param world World that the Chunk is in
|
|
* @param world World that the Chunk is in
|
|
*/
|
|
*/
|
|
- public void unloadChunk(int cx, int cz, World world);
|
|
|
|
|
|
+ void unloadChunk(int cx, int cz, World world);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Informs the ChunkletManager a chunk is loaded
|
|
* Informs the ChunkletManager a chunk is loaded
|
|
@@ -49,7 +49,7 @@ public interface ChunkletManager {
|
|
* @param cz Chunk Z coordinate that is loaded
|
|
* @param cz Chunk Z coordinate that is loaded
|
|
* @param world World that the chunk was loaded in
|
|
* @param world World that the chunk was loaded in
|
|
*/
|
|
*/
|
|
- public void chunkLoaded(int cx, int cz, World world);
|
|
|
|
|
|
+ void chunkLoaded(int cx, int cz, World world);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Informs the ChunkletManager a chunk is unloaded
|
|
* Informs the ChunkletManager a chunk is unloaded
|
|
@@ -58,38 +58,38 @@ public interface ChunkletManager {
|
|
* @param cz Chunk Z coordinate that is unloaded
|
|
* @param cz Chunk Z coordinate that is unloaded
|
|
* @param world World that the chunk was unloaded in
|
|
* @param world World that the chunk was unloaded in
|
|
*/
|
|
*/
|
|
- public void chunkUnloaded(int cx, int cz, World world);
|
|
|
|
|
|
+ void chunkUnloaded(int cx, int cz, World world);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Save all ChunkletStores related to the given world
|
|
* Save all ChunkletStores related to the given world
|
|
*
|
|
*
|
|
* @param world World to save
|
|
* @param world World to save
|
|
*/
|
|
*/
|
|
- public void saveWorld(World world);
|
|
|
|
|
|
+ void saveWorld(World world);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Unload all ChunkletStores from memory related to the given world after saving them
|
|
* Unload all ChunkletStores from memory related to the given world after saving them
|
|
*
|
|
*
|
|
* @param world World to unload
|
|
* @param world World to unload
|
|
*/
|
|
*/
|
|
- public void unloadWorld(World world);
|
|
|
|
|
|
+ void unloadWorld(World world);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Load all ChunkletStores from all loaded chunks from this world into memory
|
|
* Load all ChunkletStores from all loaded chunks from this world into memory
|
|
*
|
|
*
|
|
* @param world World to load
|
|
* @param world World to load
|
|
*/
|
|
*/
|
|
- public void loadWorld(World world);
|
|
|
|
|
|
+ void loadWorld(World world);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Save all ChunkletStores
|
|
* Save all ChunkletStores
|
|
*/
|
|
*/
|
|
- public void saveAll();
|
|
|
|
|
|
+ void saveAll();
|
|
|
|
|
|
/**
|
|
/**
|
|
* Unload all ChunkletStores after saving them
|
|
* Unload all ChunkletStores after saving them
|
|
*/
|
|
*/
|
|
- public void unloadAll();
|
|
|
|
|
|
+ void unloadAll();
|
|
|
|
|
|
/**
|
|
/**
|
|
* Check to see if a given location is set to true
|
|
* Check to see if a given location is set to true
|
|
@@ -100,7 +100,7 @@ public interface ChunkletManager {
|
|
* @param world World to check in
|
|
* @param world World to check in
|
|
* @return true if the given location is set to true, false if otherwise
|
|
* @return true if the given location is set to true, false if otherwise
|
|
*/
|
|
*/
|
|
- public boolean isTrue(int x, int y, int z, World world);
|
|
|
|
|
|
+ boolean isTrue(int x, int y, int z, World world);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Check to see if a given block location is set to true
|
|
* Check to see if a given block location is set to true
|
|
@@ -108,7 +108,7 @@ public interface ChunkletManager {
|
|
* @param block Block location to check
|
|
* @param block Block location to check
|
|
* @return true if the given block location is set to true, false if otherwise
|
|
* @return true if the given block location is set to true, false if otherwise
|
|
*/
|
|
*/
|
|
- public boolean isTrue(Block block);
|
|
|
|
|
|
+ boolean isTrue(Block block);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Set a given location to true, should create stores as necessary if the location does not exist
|
|
* Set a given location to true, should create stores as necessary if the location does not exist
|
|
@@ -118,14 +118,14 @@ public interface ChunkletManager {
|
|
* @param z Z coordinate to set
|
|
* @param z Z coordinate to set
|
|
* @param world World to set in
|
|
* @param world World to set in
|
|
*/
|
|
*/
|
|
- public void setTrue(int x, int y, int z, World world);
|
|
|
|
|
|
+ void setTrue(int x, int y, int z, World world);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Set a given block location to true, should create stores as necessary if the location does not exist
|
|
* Set a given block location to true, should create stores as necessary if the location does not exist
|
|
*
|
|
*
|
|
* @param block Block location to set
|
|
* @param block Block location to set
|
|
*/
|
|
*/
|
|
- public void setTrue(Block block);
|
|
|
|
|
|
+ void setTrue(Block block);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Set a given location to false, should not create stores if one does not exist for the given location
|
|
* Set a given location to false, should not create stores if one does not exist for the given location
|
|
@@ -135,17 +135,17 @@ public interface ChunkletManager {
|
|
* @param z Z coordinate to set
|
|
* @param z Z coordinate to set
|
|
* @param world World to set in
|
|
* @param world World to set in
|
|
*/
|
|
*/
|
|
- public void setFalse(int x, int y, int z, World world);
|
|
|
|
|
|
+ void setFalse(int x, int y, int z, World world);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Set a given block location to false, should not create stores if one does not exist for the given location
|
|
* Set a given block location to false, should not create stores if one does not exist for the given location
|
|
*
|
|
*
|
|
* @param block Block location to set
|
|
* @param block Block location to set
|
|
*/
|
|
*/
|
|
- public void setFalse(Block block);
|
|
|
|
|
|
+ void setFalse(Block block);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Delete any ChunkletStores that are empty
|
|
* Delete any ChunkletStores that are empty
|
|
*/
|
|
*/
|
|
- public void cleanUp();
|
|
|
|
|
|
+ void cleanUp();
|
|
}
|
|
}
|