Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add temperature and humidity values to biome #8

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
29 changes: 21 additions & 8 deletions src/main/java/org/terasology/core/world/CoreBiome.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,24 @@
import org.terasology.naming.Name;

public enum CoreBiome implements Biome {
MOUNTAINS("Mountains"),
SNOW("Snow"),
DESERT("Desert"),
FOREST("Forest"),
OCEAN("Ocean"),
BEACH("Beach"),
PLAINS("Plains");
MOUNTAINS("Mountains", .3f, .09f),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks way better from the technical perspective now 👍

SNOW("Snow", .85f, .05f),
DESERT("Desert", .15f, .26f),
FOREST("Forest", .65f, .22f),
OCEAN("Ocean", .9f, .13f),
BEACH("Beach", .8f, .28f),
PLAINS("Plains", .55f, .22f);

private final Name id;
private final String displayName;
private final float humidity;
private final float temperature;

CoreBiome(String displayName) {
CoreBiome(String displayName, float humidity, float temperature) {
this.id = new Name("CoreWorlds:" + name());
this.displayName = displayName;
this.humidity = humidity;
this.temperature = temperature;
}

@Override
Expand All @@ -50,4 +54,13 @@ public String toString() {
return this.displayName;
}

@Override
public float getHumidity() {
return this.humidity;
}

@Override
public float getTemperature() {
return this.temperature;
}
}