Archived
0

WorldGenerator gen 1

This commit is contained in:
Forwolk
2018-08-01 10:43:37 +03:00
parent b2f5af9a84
commit ff55368db2
15 changed files with 799 additions and 34 deletions

View File

@@ -3,9 +3,13 @@ package mc.core.block;
import lombok.Getter;
public enum BlockType {
DIRT(1, "Dirt"),
STONE(1, "Stone"),
GRASS(2, "Grass"),
BEDROCK(7, "Bedrock");
DIRT(3, "Dirt"),
BEDROCK(7, "Bedrock"),
WATER(8, "Water"),
SAND(12, "Sand"),
SNOW(32, "Snow");
@Getter
private final int id;

View File

@@ -3,37 +3,41 @@ package mc.core.world;
import lombok.Getter;
public enum Biome {
OCEAN(0, "Ocean"),
PLAINS(1, "Plains"),
DESERT(2, "Desert"),
EXTREME_HILLS(3, "Extreme hills"),
FOREST(4, "Forest"),
TAIGA(5, "Taiga"),
SWAMPLAND(6, "Swampland"),
RIVER(7, "River"),
HELL(8, "Hell"),
SKY(9, "Sky"),
FROZEN_OCEAN(10, "Frozen ocean"),
FROZEN_RIVER(11, "Frozen river"),
ICE_PLAINS(12, "Ice plains"),
ICE_MOUNTAINS(13, "Ice mountains"),
MUSHROOM_ISLAND(14, "Mushroom island"),
MUSHROOM_ISLAND_SHORE(15, "Mushroom island shore"),
BEACH(16, "Beach"),
DESERT_HILLS(17, "Desert hills"),
FOREST_HILLS(18, "Forest hills"),
TAIGA_HILLS(19, "Taiga hills"),
EXTREME_HILLS_EDGE(20, "Extreme hills edge"),
JUNGLE(21, "Jungle"),
JUNGLE_HILLS(22, "Jungle hills");
OCEAN(0, "Ocean", 0x000080),
PLAINS(1, "Plains", 0x008000),
DESERT(2, "Desert", 0xbdb76b),
EXTREME_HILLS(3, "Extreme hills", 0xffffff),
FOREST(4, "Forest", 0x006400),
TAIGA(5, "Taiga", 0xf0f8ff),
SWAMPLAND(6, "Swampland", 0x808000),
RIVER(7, "River", 0xffffff),
HELL(8, "Hell", 0xffffff),
SKY(9, "Sky", 0xffffff),
FROZEN_OCEAN(10, "Frozen ocean", 0xe0ffff),
FROZEN_RIVER(11, "Frozen river", 0xffffff),
ICE_PLAINS(12, "Ice plains", 0xfffafa),
ICE_MOUNTAINS(13, "Ice mountains", 0xfffafa),
MUSHROOM_ISLAND(14, "Mushroom island", 0xffffff),
MUSHROOM_ISLAND_SHORE(15, "Mushroom island shore", 0xffffff),
BEACH(16, "Beach", 0xffffff),
DESERT_HILLS(17, "Desert hills", 0xbdb76b),
FOREST_HILLS(18, "Forest hills", 0x006400),
TAIGA_HILLS(19, "Taiga hills", 0xf0f8ff),
EXTREME_HILLS_EDGE(20, "Extreme hills edge", 0xffffff),
JUNGLE(21, "Jungle", 0xadff2f),
JUNGLE_HILLS(22, "Jungle hills", 0xadff2f),
DEEP_OCEAN(23, "Deep ocean", 0x191970);
@Getter
private final int id;
@Getter
private final String name;
@Getter
private final int color;
Biome(int id, String name) {
Biome(int id, String name, int color) {
this.id = id;
this.name = name;
this.color = color;
}
}

View File

@@ -19,7 +19,6 @@ public interface Region {
void setChunk(int x, int y, int z, Chunk chunk);
int getX();
int getY();
int getZ();
Biome getBiomeAt (int x, int z);

View File

@@ -49,5 +49,8 @@ public interface World {
Chunk getChunk(int x, int y, int z);
void setChunk(int x, int y, int z, Chunk chunk);
long getSeed ();
Region getRegion (int x, int z);
void setRegion (int x, int z, Region region);
int getSeed ();
}