stash 2
This commit is contained in:
15
core/src/main/java/mc/core/world/Block.java
Normal file
15
core/src/main/java/mc/core/world/Block.java
Normal 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();
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user