World, Chunk, Block interfaces
This commit is contained in:
21
src/main/java/mc/core/world/Block.java
Normal file
21
src/main/java/mc/core/world/Block.java
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* DmitriyMX <dimon550@gmail.com>
|
||||||
|
* 2018-04-15
|
||||||
|
*/
|
||||||
|
package mc.core.world;
|
||||||
|
|
||||||
|
import mc.core.Location;
|
||||||
|
|
||||||
|
public interface Block {
|
||||||
|
Location getLocation();
|
||||||
|
void setLocation(Location location);
|
||||||
|
|
||||||
|
int getType();
|
||||||
|
void setType(int value);
|
||||||
|
|
||||||
|
int getMetadata();
|
||||||
|
void setMetadata(int value);
|
||||||
|
|
||||||
|
int getLight();
|
||||||
|
void setLight(int value);
|
||||||
|
}
|
||||||
23
src/main/java/mc/core/world/Chunk.java
Normal file
23
src/main/java/mc/core/world/Chunk.java
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* DmitriyMX <dimon550@gmail.com>
|
||||||
|
* 2018-04-15
|
||||||
|
*/
|
||||||
|
package mc.core.world;
|
||||||
|
|
||||||
|
/* 16x256x16 */
|
||||||
|
public interface Chunk {
|
||||||
|
Block getBlock(int x, int y, int z);
|
||||||
|
void setBlock(Block block);
|
||||||
|
|
||||||
|
int getBlockType(int x, int y, int z);
|
||||||
|
void setBlockType(int x, int y, int z, int type);
|
||||||
|
|
||||||
|
int getBlockMetadata(int x, int y, int z);
|
||||||
|
void setBlockMetadata(int x, int y, int z, int metadata);
|
||||||
|
|
||||||
|
int getBlockLight(int x, int y, int z);
|
||||||
|
void setBlockLight(int x, int y, int z, int lightLevel);
|
||||||
|
|
||||||
|
int getSkyLight(int x, int y, int z);
|
||||||
|
void setSkyLight(int x, int y, int z, int lightLevel);
|
||||||
|
}
|
||||||
15
src/main/java/mc/core/world/World.java
Normal file
15
src/main/java/mc/core/world/World.java
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* DmitriyMX <dimon550@gmail.com>
|
||||||
|
* 2018-04-15
|
||||||
|
*/
|
||||||
|
package mc.core.world;
|
||||||
|
|
||||||
|
import mc.core.Location;
|
||||||
|
|
||||||
|
public interface World {
|
||||||
|
Location getSpawn();
|
||||||
|
void setSpawn(Location location);
|
||||||
|
|
||||||
|
Chunk getChunk(int x, int z);
|
||||||
|
void setChunk(int x, int z, Chunk chunk);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user