renamed: Chunk --> ChunkSection
This commit is contained in:
@@ -110,4 +110,5 @@ public class Location implements Serializable{
|
||||
public void setWorld (World world) {
|
||||
this.world = new WeakReference<>(world);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package mc.core.serialization;
|
||||
|
||||
import mc.core.world.Chunk;
|
||||
import mc.core.world.ChunkSection;
|
||||
import mc.core.world.Region;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public interface IChunkReader {
|
||||
Chunk read (Region region, int x, int y, int z) throws IOException;
|
||||
ChunkSection read (Region region, int x, int y, int z) throws IOException;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public interface ChunkLoader {
|
||||
* @param z chunk position
|
||||
* @return optional of chunk (nullable)
|
||||
*/
|
||||
Optional<Chunk> loadChunk (int x, int y, int z);
|
||||
Optional<ChunkSection> loadChunk (int x, int y, int z);
|
||||
|
||||
/**
|
||||
* Tries to load chunk like {@link #loadChunk(int, int, int)}
|
||||
@@ -23,5 +23,5 @@ public interface ChunkLoader {
|
||||
* @param z chunk position
|
||||
* @return chunk
|
||||
*/
|
||||
Chunk loadOrGenerateChunk (int x, int y, int z);
|
||||
ChunkSection loadOrGenerateChunk (int x, int y, int z);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.io.Serializable;
|
||||
*
|
||||
*/
|
||||
/* 16x16x16 */
|
||||
public interface Chunk extends Serializable{
|
||||
public interface ChunkSection extends Serializable{
|
||||
int getBlockType(int x, int y, int z);
|
||||
void setBlockType(int x, int y, int z, int type);
|
||||
|
||||
@@ -21,8 +21,8 @@ import java.io.Serializable;
|
||||
*
|
||||
*/
|
||||
public interface Region extends Serializable{
|
||||
Chunk getChunkAt(int x, int y, int z);
|
||||
void setChunk(int x, int y, int z, Chunk chunk);
|
||||
ChunkSection getChunkAt(int x, int y, int z);
|
||||
void setChunk(int x, int y, int z, ChunkSection chunkSection);
|
||||
|
||||
int getX();
|
||||
int getZ();
|
||||
@@ -32,5 +32,5 @@ public interface Region extends Serializable{
|
||||
|
||||
World getWorld();
|
||||
|
||||
void save(Serializer<Chunk> chunkSerializer, IRegionReaderWriter regionReaderWritter) throws IOException;
|
||||
void save(Serializer<ChunkSection> chunkSerializer, IRegionReaderWriter regionReaderWritter) throws IOException;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
*/
|
||||
package mc.core.world;
|
||||
|
||||
import mc.core.Location;
|
||||
import mc.core.WarpPosition;
|
||||
import mc.core.nbt.Taggable;
|
||||
|
||||
@@ -49,8 +48,8 @@ public interface World extends Taggable, Serializable{
|
||||
WarpPosition getSpawn();
|
||||
void setSpawn(WarpPosition location);
|
||||
|
||||
Chunk getChunk(int x, int y, int z);
|
||||
void setChunk(int x, int y, int z, Chunk chunk);
|
||||
ChunkSection getChunk(int x, int y, int z);
|
||||
void setChunk(int x, int y, int z, ChunkSection chunkSection);
|
||||
|
||||
Region getRegion(int x, int z);
|
||||
void setRegion(int x, int z, Region region);
|
||||
|
||||
Reference in New Issue
Block a user