diff --git a/common/src/common/biome/BaseBiome.java b/common/src/common/biome/BaseBiome.java new file mode 100644 index 0000000..91c6a43 --- /dev/null +++ b/common/src/common/biome/BaseBiome.java @@ -0,0 +1,47 @@ +package common.biome; + +public abstract class BaseBiome { + public final int id; + public final String name; + public final String display; + public final int color; + public final float temperature; + public final float humidity; + public final int waterColor; + public final int skyColor; + public final int fogColor; + public final int cloudColor; + + private BaseBiome(int id, String name, String display, int color, float temperature, float humidity, int waterColor, int skyColor, int fogColor, int cloudColor) { + this.id = id; + this.name = name; + this.display = display; + this.temperature = temperature; + this.humidity = humidity; + this.color = color; + this.waterColor = waterColor; + this.skyColor = skyColor; + this.fogColor = fogColor; + this.cloudColor = cloudColor; + } + + private BaseBiome(int id, String name, String display, int color, float temperature, float humidity, int waterColor) { + this(id, name, display, color, temperature, humidity, waterColor, 0xffffffff, 0xffffffff, 0xffffffff); + } + + private BaseBiome(int id, String name, String display, int color, float temperature, float humidity, int skyColor, int fogColor, int cloudColor) { + this(id, name, display, color, temperature, humidity, 0xffffff, skyColor, fogColor, cloudColor); + } + + private BaseBiome(int id, String name, String display, int color, float temperature, float humidity) { + this(id, name, display, color, temperature, humidity, 0xffffff, 0xffffffff, 0xffffffff, 0xffffffff); + } + + private BaseBiome(int id, String name, String display, int color, float temperature) { + this(id, name, display, color, temperature, 50.0f, 0xffffff, 0xffffffff, 0xffffffff, 0xffffffff); + } + + private BaseBiome(int id, String name, String display, int color) { + this(id, name, display, color, 0.0f, 50.0f, 0xffffff, 0xffffffff, 0xffffffff, 0xffffffff); + } +} diff --git a/common/src/common/biome/Biome.java b/common/src/common/biome/Biome.java index b4d4ea8..e37576a 100755 --- a/common/src/common/biome/Biome.java +++ b/common/src/common/biome/Biome.java @@ -145,13 +145,14 @@ public abstract class Biome { public String name = null; public String display = ""; public int color = 0x000000; + protected float temperature = 0.0f; + protected float humidity = 50.0f; + public int waterColor = 0xffffff; + public State topBlock = Blocks.grass.getState(); public State fillerBlock = Blocks.dirt.getState(); public float depth = Scaling.VARYING_LOW.depth; public float scale = Scaling.VARYING_LOW.scale; - protected float temperature = 0.0f; - protected float humidity = 50.0f; - public int waterColor = 0xffffff; public boolean generateLakes = true; public boolean generateLiquids = true; public boolean allowColdBeach = false; @@ -765,6 +766,7 @@ public abstract class Biome { throw new IllegalStateException("Biom \"" + biome.name + "\" ist als ID " + LOOKUP.get(biome.name.toLowerCase()).id + " und " + biome.id + " definiert"); LOOKUP.put(biome.name.toLowerCase(), biome); LIST.add(biome); + System.out.printf("%s(%d, \"%s\", \"%s\", 0x%06x, %.1ff, %.1ff),\n", biome.name.toUpperCase(), biome.id, biome.name, biome.display, biome.color, biome.temperature, biome.humidity); } } }