Merge & resolve conflicts
This commit is contained in:
@@ -17,9 +17,11 @@ import java.util.stream.Stream;
|
||||
|
||||
public class FlatWorld implements World {
|
||||
|
||||
@Getter@Setter
|
||||
@Getter
|
||||
@Setter
|
||||
private UUID worldId = UUID.fromString("00000000-0000-0000-C000-000000000046");
|
||||
@Getter@Setter
|
||||
@Getter
|
||||
@Setter
|
||||
private String name;
|
||||
|
||||
@Getter
|
||||
@@ -49,7 +51,7 @@ public class FlatWorld implements World {
|
||||
|
||||
@Override
|
||||
public void setRegion(int x, int z, Region region) {
|
||||
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,48 +4,15 @@
|
||||
*/
|
||||
package mc.world.flat;
|
||||
|
||||
import mc.core.block.Block;
|
||||
import mc.core.block.BlockFactory;
|
||||
import mc.core.block.BlockType;
|
||||
import mc.core.world.Biome;
|
||||
import mc.core.world.ChunkSection;
|
||||
import mc.core.world.Region;
|
||||
import mc.core.world.World;
|
||||
import mc.core.world.block.Block;
|
||||
import mc.core.world.block.BlockFactory;
|
||||
import mc.core.world.block.BlockType;
|
||||
|
||||
public class SimpleChunkSection implements ChunkSection {
|
||||
@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;
|
||||
}
|
||||
|
||||
@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) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSkyLight(int x, int y, int z) {
|
||||
if (y <= 3) return 0;
|
||||
@@ -93,7 +60,7 @@ public class SimpleChunkSection implements ChunkSection {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlock(int x, int y, int z, Block block) {
|
||||
public void setBlock(Block block) {
|
||||
|
||||
}
|
||||
|
||||
@@ -104,7 +71,7 @@ public class SimpleChunkSection implements ChunkSection {
|
||||
if (y == 0) return blockFactory.create(BlockType.BEDROCK, 0);
|
||||
else if (y >= 1 && y <= 2) return blockFactory.create(BlockType.DIRT, 0);
|
||||
else if (y == 3) return blockFactory.create(BlockType.GRASS, 0);
|
||||
else return Block.airBlock(x, y, z);
|
||||
else return blockFactory.create(BlockType.AIR, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user