More biomes
This commit is contained in:
@@ -3,8 +3,29 @@ package mc.core.world;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
public enum Biome {
|
public enum Biome {
|
||||||
PLAIN(0, "Plain"),
|
OCEAN(0, "Ocean"),
|
||||||
DESERT(1, "Desert");
|
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");
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private final int id;
|
private final int id;
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ import mc.core.block.Block;
|
|||||||
* +-------------+----------------+------------+
|
* +-------------+----------------+------------+
|
||||||
* | param | range | bits |
|
* | param | range | bits |
|
||||||
* +-------------+----------------+------------+
|
* +-------------+----------------+------------+
|
||||||
* | biomeMap | 16x16 0-16 | 4096 |
|
|
||||||
* +-------------+----------------+------------+
|
|
||||||
* | | | 3 |
|
* | | | 3 |
|
||||||
* +-------------+----------------+------------+
|
* +-------------+----------------+------------+
|
||||||
* | block_count | 0:4096 | 13 |
|
* | block_count | 0:4096 | 13 |
|
||||||
@@ -21,8 +19,8 @@ import mc.core.block.Block;
|
|||||||
* | blocks | array | 24*count |
|
* | blocks | array | 24*count |
|
||||||
* +-------------+----------------+------------+
|
* +-------------+----------------+------------+
|
||||||
*
|
*
|
||||||
* Total: 4112 bits header (514 bytes) + 24 * block_count bits (3 * block_count bytes)
|
* Total: 16 bits header (2 bytes) + 24 * block_count bits (3 * block_count bytes)
|
||||||
* Max size: 12802 bytes (~13 Mb per chunk)
|
* Max size: 12290 bytes (~12 Mb per chunk)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/* 16x16x16 */
|
/* 16x16x16 */
|
||||||
|
|||||||
@@ -3,6 +3,16 @@ package mc.core.world;
|
|||||||
/**
|
/**
|
||||||
* Simple world generation unit
|
* Simple world generation unit
|
||||||
* 16x16x16 chunks
|
* 16x16x16 chunks
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* +-------------+----------------+------------+
|
||||||
|
* | param | range | bits |
|
||||||
|
* +-------------+----------------+------------+
|
||||||
|
* | biome_map | 256x256 0-32 | 2097152 |
|
||||||
|
* +-------------+----------------+------------+
|
||||||
|
*
|
||||||
|
* Total: 2097152 bits (262144 bytes = 256 Mb)
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public interface Region {
|
public interface Region {
|
||||||
Chunk getChunkAt(int x, int y, int z);
|
Chunk getChunkAt(int x, int y, int z);
|
||||||
|
|||||||
@@ -8,6 +8,26 @@ import mc.core.Location;
|
|||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WorldInfo
|
||||||
|
* +-------------+----------------+------------+
|
||||||
|
* | param | range | bits |
|
||||||
|
* +-------------+----------------+------------+
|
||||||
|
* | worldId | uuid | 128 |
|
||||||
|
* +-------------+----------------+------------+
|
||||||
|
* | worldName | string [0-64] | 512 |
|
||||||
|
* +-------------+----------------+------------+
|
||||||
|
* | spawnX | -524288:524287 | 20 |
|
||||||
|
* +-------------+----------------+------------+
|
||||||
|
* | spawnY | 0:255 | 8 |
|
||||||
|
* +-------------+----------------+------------+
|
||||||
|
* | spawnZ | -524288:524287 | 20 |
|
||||||
|
* +-------------+----------------+------------+
|
||||||
|
* | seed | long | 64 |
|
||||||
|
* +-------------+----------------+------------+
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
public interface World {
|
public interface World {
|
||||||
UUID getWorldId();
|
UUID getWorldId();
|
||||||
IWorldType getWorldType();
|
IWorldType getWorldType();
|
||||||
@@ -17,4 +37,6 @@ public interface World {
|
|||||||
|
|
||||||
Chunk getChunk(int x, int y, int z);
|
Chunk getChunk(int x, int y, int z);
|
||||||
void setChunk(int x, int y, int z, Chunk chunk);
|
void setChunk(int x, int y, int z, Chunk chunk);
|
||||||
|
|
||||||
|
long getSeed ();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class SimpleChunk implements Chunk {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Biome getBiome(int x, int z) {
|
public Biome getBiome(int x, int z) {
|
||||||
return Biome.PLAIN;
|
return Biome.PLAINS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user