Archived
0
This commit is contained in:
2018-08-02 14:25:29 +03:00
parent e682abf662
commit 0152377289
4 changed files with 84 additions and 21 deletions

View File

@@ -0,0 +1,15 @@
/*
* DmitriyMX <dimon550@gmail.com>
* 2018-08-02
*/
package mc.core.world;
import mc.core.Location;
public interface Block {
int getId();
int getState();
int getMetadata();
int getLight();
Location getLocation();
}

View File

@@ -4,16 +4,15 @@
*/
package mc.core.world;
import mc.core.Location;
/* 16x16x16 */
public interface Chunk {
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);
Block getBlock(int x, int y, int z);
default Block getBlock(Location location) {
return getBlock(location.getBlockX(), location.getBlockY(), location.getBlockZ());
}
void setBlock(Block block);
int getSkyLight(int x, int y, int z);
void setSkyLight(int x, int y, int z, int lightLevel);