Skip to content

Commit

Permalink
Remove some duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Mar 29, 2024
1 parent 1803e2b commit 0ffccb4
Showing 1 changed file with 4 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,10 @@ private int getTemp(double temp) {
return Biome.MANGROVE_SWAMP;
}

private @NonNull Biome getValleysNearInlandBiome(int humidity, int temperature, int erosion, double weirdness) {
return getFarInlandValleysBiome(humidity, temperature, erosion, weirdness);
}

private @NonNull Biome getFarInlandPeaksBiome(int humidity, int temperature, int erosion, double weirdness) {
if (erosion == 0) {
if (temperature >= 0 && temperature <= 2) {
Expand Down Expand Up @@ -673,25 +677,6 @@ private int getTemp(double temp) {
};
}

private @NonNull Biome getValleysNearInlandBiome(int humidity, int temperature, int erosion, double weirdness) {
//case VALLEYS:
if (erosion >= 0 && erosion < 6) {
if (temperature > 0D) {
return Biome.RIVER;
} else {
return Biome.FROZEN_RIVER;
}
}
// e == 6
if (temperature == 0) {
return Biome.FROZEN_RIVER;
}
if (temperature == 1 || temperature == 2) {
return Biome.SWAMP;
}
return Biome.MANGROVE_SWAMP;
}

private @NonNull Biome getPeaksNearInlandBiome(int humidity, int temperature, int erosion, double weirdness) {
if (erosion == 0) {
if (temperature >= 0 && temperature <= 2) {
Expand Down

0 comments on commit 0ffccb4

Please sign in to comment.