Bigger mountains
This commit is contained in:
@@ -3,30 +3,30 @@ package mc.core.world;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
public enum Biome {
|
public enum Biome {
|
||||||
OCEAN(0, "Ocean", 0x000080),
|
OCEAN(0, "Ocean", 0x0000cd),
|
||||||
PLAINS(1, "Plains", 0x008000),
|
PLAINS(1, "Plains", 0x008000),
|
||||||
DESERT(2, "Desert", 0xbdb76b),
|
DESERT(2, "Desert", 0xffe4b5),
|
||||||
EXTREME_HILLS(3, "Extreme hills", 0xffffff),
|
EXTREME_HILLS(3, "Extreme hills", 0xffffff),
|
||||||
FOREST(4, "Forest", 0x006400),
|
FOREST(4, "Forest", 0x006400),
|
||||||
TAIGA(5, "Taiga", 0xf0f8ff),
|
TAIGA(5, "Taiga", 0xf0f8ff),
|
||||||
SWAMPLAND(6, "Swampland", 0x808000),
|
SWAMPLAND(6, "Swampland", 0x808000),
|
||||||
RIVER(7, "River", 0xffffff),
|
RIVER(7, "River", 0x0000cd),
|
||||||
HELL(8, "Hell", 0xffffff),
|
HELL(8, "Hell", 0x800000),
|
||||||
SKY(9, "Sky", 0xffffff),
|
SKY(9, "Sky", 0xffffff),
|
||||||
FROZEN_OCEAN(10, "Frozen ocean", 0xe0ffff),
|
FROZEN_OCEAN(10, "Frozen ocean", 0xe0ffff),
|
||||||
FROZEN_RIVER(11, "Frozen river", 0xffffff),
|
FROZEN_RIVER(11, "Frozen river", 0xe0ffff),
|
||||||
ICE_PLAINS(12, "Ice plains", 0xfffafa),
|
ICE_PLAINS(12, "Ice plains", 0xfffafa),
|
||||||
ICE_MOUNTAINS(13, "Ice mountains", 0xfffafa),
|
ICE_MOUNTAINS(13, "Ice mountains", 0xfffafa),
|
||||||
MUSHROOM_ISLAND(14, "Mushroom island", 0xffffff),
|
MUSHROOM_ISLAND(14, "Mushroom island", 0xffffff),
|
||||||
MUSHROOM_ISLAND_SHORE(15, "Mushroom island shore", 0xffffff),
|
MUSHROOM_ISLAND_SHORE(15, "Mushroom island shore", 0xffffff),
|
||||||
BEACH(16, "Beach", 0xffffff),
|
BEACH(16, "Beach", 0xffffff),
|
||||||
DESERT_HILLS(17, "Desert hills", 0xbdb76b),
|
DESERT_HILLS(17, "Desert hills", 0xffe4b5),
|
||||||
FOREST_HILLS(18, "Forest hills", 0x006400),
|
FOREST_HILLS(18, "Forest hills", 0x006400),
|
||||||
TAIGA_HILLS(19, "Taiga hills", 0xf0f8ff),
|
TAIGA_HILLS(19, "Taiga hills", 0xf0f8ff),
|
||||||
EXTREME_HILLS_EDGE(20, "Extreme hills edge", 0xffffff),
|
EXTREME_HILLS_EDGE(20, "Extreme hills edge", 0xffffff),
|
||||||
JUNGLE(21, "Jungle", 0xadff2f),
|
JUNGLE(21, "Jungle", 0xadff2f),
|
||||||
JUNGLE_HILLS(22, "Jungle hills", 0xadff2f),
|
JUNGLE_HILLS(22, "Jungle hills", 0xadff2f),
|
||||||
DEEP_OCEAN(23, "Deep ocean", 0x191970);
|
DEEP_OCEAN(23, "Deep ocean", 0x000080);
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private final int id;
|
private final int id;
|
||||||
|
|||||||
@@ -131,7 +131,11 @@ public class SeedBasedWorldGenerator implements WorldGenerator {
|
|||||||
temperatureMap[x][z] = (int) (WORLD_MAX_TEMPERATURE * Math.min((k * k + q * q + k * q) * k * q, 0.99));
|
temperatureMap[x][z] = (int) (WORLD_MAX_TEMPERATURE * Math.min((k * k + q * q + k * q) * k * q, 0.99));
|
||||||
if (heightMap[x][z] < WORLD_SEA_LEVEL) {
|
if (heightMap[x][z] < WORLD_SEA_LEVEL) {
|
||||||
biomes[x][z] = Biome.OCEAN;
|
biomes[x][z] = Biome.OCEAN;
|
||||||
wetMap[x][z] = WORLD_MAX_WETNESS;
|
wetMap[x][z] = (int) (WORLD_MAX_WETNESS * noiseGenerator.noise(tx, tz));
|
||||||
|
} else {
|
||||||
|
int th = heightMap[x][z] - WORLD_SEA_LEVEL;
|
||||||
|
th = (int) (th * (1 + 1.25 * th / (WORLD_MAX_HEIGHT - WORLD_SEA_LEVEL)));
|
||||||
|
heightMap[x][z] = Math.min(WORLD_SEA_LEVEL + th, WORLD_MAX_HEIGHT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -161,7 +165,7 @@ public class SeedBasedWorldGenerator implements WorldGenerator {
|
|||||||
|
|
||||||
for (int z = 1; z < WorldConstants.WORLD_REGION_SIZE - 1; z++) {
|
for (int z = 1; z < WorldConstants.WORLD_REGION_SIZE - 1; z++) {
|
||||||
for (int x = 1; x < WorldConstants.WORLD_REGION_SIZE - 1; x ++) {
|
for (int x = 1; x < WorldConstants.WORLD_REGION_SIZE - 1; x ++) {
|
||||||
wetMap[x][z] = (int) Math.min(WORLD_MAX_WETNESS, 60 * noiseGenerator.noise(x / 31d, z / 67d) + wetMap[x][z] * (1 + 0.2 * SeedRandomGenerator.random(x, z, world.getSeed())));
|
wetMap[x][z] = (int) Math.min(WORLD_MAX_WETNESS, WORLD_BASE_WETNESS * noiseGenerator.noise(x / 31d, z / 67d) + wetMap[x][z] * (1 + 0.2 * (0.5 - SeedRandomGenerator.random(x, z, world.getSeed()))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ public final class WorldConstants {
|
|||||||
public static final int WORLD_REGION_SIZE = 256;
|
public static final int WORLD_REGION_SIZE = 256;
|
||||||
public static final int WORLD_MAX_TEMPERATURE = 100;
|
public static final int WORLD_MAX_TEMPERATURE = 100;
|
||||||
public static final int WORLD_MAX_WETNESS = 100;
|
public static final int WORLD_MAX_WETNESS = 100;
|
||||||
|
public static final int WORLD_BASE_WETNESS = 30;
|
||||||
|
|
||||||
public static final double WORLD_LAND_SIZE = 53.0;
|
public static final double WORLD_LAND_SIZE = 53.0;
|
||||||
public static final double WORLD_LAKE_SIZE = 6.0;
|
public static final double WORLD_LAKE_SIZE = 6.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user