biome split temp commit

This commit is contained in:
Sen 2025-05-13 18:31:28 +02:00
parent 6d1e00ddef
commit e26938ee77
2 changed files with 52 additions and 3 deletions

View file

@ -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);
}
}

View file

@ -145,13 +145,14 @@ public abstract class Biome {
public String name = null; public String name = null;
public String display = "<?>"; public String display = "<?>";
public int color = 0x000000; 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 topBlock = Blocks.grass.getState();
public State fillerBlock = Blocks.dirt.getState(); public State fillerBlock = Blocks.dirt.getState();
public float depth = Scaling.VARYING_LOW.depth; public float depth = Scaling.VARYING_LOW.depth;
public float scale = Scaling.VARYING_LOW.scale; 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 generateLakes = true;
public boolean generateLiquids = true; public boolean generateLiquids = true;
public boolean allowColdBeach = false; 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"); 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); LOOKUP.put(biome.name.toLowerCase(), biome);
LIST.add(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);
} }
} }
} }