Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
juraj-hrivnak committed Sep 4, 2022
1 parent 0233ef4 commit bd4109f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main/java/rtg/api/world/biome/RealisticBiomeBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public RealisticBiomeBase(@Nonnull final Biome baseBiome, @Nonnull final RiverTy
ResourceLocation resloc = baseBiome.getRegistryName();
if (resloc == null) {
throw new IllegalStateException(String.format("Biome with ID: %s, of class: %s, does not have a registry name set.",
Biome.getIdForBiome(baseBiome), baseBiome.getClass().getName()));
Biome.getIdForBiome(baseBiome), baseBiome.getClass().getName()));
}

this.baseBiome = baseBiome;
Expand All @@ -72,6 +72,10 @@ public RealisticBiomeBase(@Nonnull final Biome baseBiome, @Nonnull final RiverTy
this.riverType = riverType;
this.beachType = beachType;
this.config = new BiomeConfig(getConfigFile());

initConfig();
getConfig().loadConfig();

this.terrain = initTerrain();
this.surface = initSurface();
this.surfaceRiver = new SurfaceRiverOasis(config);
Expand All @@ -81,12 +85,7 @@ public RealisticBiomeBase(@Nonnull final Biome baseBiome, @Nonnull final RiverTy
this.decos = new ArrayList<>();
this.rtgTrees = new ArrayList<>();

initConfig();

getConfig().loadConfig();

initDecos();

overrideDecorations();
}

Expand Down Expand Up @@ -217,7 +216,7 @@ public float erodedNoise(RTGWorld rtgWorld, int x, int y, float river, float bor
float irregularity = rtgWorld.simplexInstance(0).noise2f(x / 12f, y / 12f) * 2f + rtgWorld.simplexInstance(0).noise2f(x / 8f, y / 8f);
// less on the bottom and more on the sides
irregularity = irregularity * (1 + r);
return (biomeHeight * (r)) + ((55f + irregularity) * 1.0f) * (1f - r);
return (biomeHeight * (r)) + ((55f + irregularity)) * (1f - r);
}
else {
return biomeHeight;
Expand Down

0 comments on commit bd4109f

Please sign in to comment.