stash 5
This commit is contained in:
20
flat_world/src/main/java/mc/world/flat/SimpleBlock.java
Normal file
20
flat_world/src/main/java/mc/world/flat/SimpleBlock.java
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* DmitriyMX <dimon550@gmail.com>
|
||||
* 2018-08-02
|
||||
*/
|
||||
package mc.world.flat;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import mc.core.Location;
|
||||
import mc.core.world.Block;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class SimpleBlock implements Block {
|
||||
private int id;
|
||||
private int state;
|
||||
private int metadata;
|
||||
private int light;
|
||||
private Location location;
|
||||
}
|
||||
@@ -4,40 +4,26 @@
|
||||
*/
|
||||
package mc.world.flat;
|
||||
|
||||
import mc.core.world.Block;
|
||||
import mc.core.world.Chunk;
|
||||
|
||||
public class SimpleChunk implements Chunk {
|
||||
@Override
|
||||
public int getBlockType(int x, int y, int z) {
|
||||
if (y == 0) return 7;
|
||||
else if (y >= 1 && y <= 2) return 3;
|
||||
else if (y == 3) return 2;
|
||||
else return 0;
|
||||
public Block getBlock(int x, int y, int z) {
|
||||
SimpleBlock block = new SimpleBlock();
|
||||
block.setMetadata(0);
|
||||
block.setLight(0);
|
||||
|
||||
if (y == 0) block.setId(7);
|
||||
else if (y >= 1 && y <= 2) block.setId(3);
|
||||
else if (y == 3) block.setId(2);
|
||||
else block.setId(0);
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockType(int x, int y, int z, int type) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlockMetadata(int x, int y, int z) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockMetadata(int x, int y, int z, int metadata) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlockLight(int x, int y, int z) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockLight(int x, int y, int z, int lightLevel) {
|
||||
|
||||
public void setBlock(Block block) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user