mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-18 23:01:03 +00:00
Generator -> GenerationSettings
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ public class BiomeFactory implements ConfigFactory<BiomeTemplate, TerraBiome> {
|
||||
|
||||
@Override
|
||||
public TerraBiome build(BiomeTemplate template, TerraPlugin main) {
|
||||
UserDefinedGenerator generator = new UserDefinedGenerator(template.getNoiseEquation(), template.getElevationEquation(), template.getCarvingEquation(), template.getBiomeNoise(), template.getElevationWeight(),
|
||||
UserDefinedGenerationSettings generator = new UserDefinedGenerationSettings(template.getNoiseEquation(), template.getElevationEquation(), template.getCarvingEquation(), template.getBiomeNoise(), template.getElevationWeight(),
|
||||
template.getBlendDistance(), template.getBlendStep(), template.getBlendWeight());
|
||||
return new UserDefinedBiome(template.getVanilla(), generator, template);
|
||||
}
|
||||
|
||||
+4
-4
@@ -4,7 +4,7 @@ import com.dfsek.terra.api.properties.Context;
|
||||
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
|
||||
import com.dfsek.terra.api.world.World;
|
||||
import com.dfsek.terra.api.world.biome.Biome;
|
||||
import com.dfsek.terra.api.world.biome.Generator;
|
||||
import com.dfsek.terra.api.world.biome.GenerationSettings;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
import java.util.Set;
|
||||
@@ -13,7 +13,7 @@ import java.util.Set;
|
||||
* Class representing a config-defined biome
|
||||
*/
|
||||
public class UserDefinedBiome implements TerraBiome {
|
||||
private final UserDefinedGenerator gen;
|
||||
private final UserDefinedGenerationSettings gen;
|
||||
private final ProbabilityCollection<Biome> vanilla;
|
||||
private final String id;
|
||||
private final BiomeTemplate config;
|
||||
@@ -22,7 +22,7 @@ public class UserDefinedBiome implements TerraBiome {
|
||||
|
||||
private final Context context = new Context();
|
||||
|
||||
public UserDefinedBiome(ProbabilityCollection<Biome> vanilla, UserDefinedGenerator gen, BiomeTemplate config) {
|
||||
public UserDefinedBiome(ProbabilityCollection<Biome> vanilla, UserDefinedGenerationSettings gen, BiomeTemplate config) {
|
||||
this.vanilla = vanilla;
|
||||
this.gen = gen;
|
||||
this.id = config.getID();
|
||||
@@ -52,7 +52,7 @@ public class UserDefinedBiome implements TerraBiome {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Generator getGenerator(World w) {
|
||||
public GenerationSettings getGenerator(World w) {
|
||||
return gen;
|
||||
}
|
||||
|
||||
|
||||
+3
-5
@@ -1,11 +1,9 @@
|
||||
package com.dfsek.terra.addons.biome;
|
||||
|
||||
import com.dfsek.terra.addons.biome.holder.PaletteHolder;
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
import com.dfsek.terra.api.world.biome.Generator;
|
||||
import com.dfsek.terra.api.world.biome.PaletteSettings;
|
||||
import com.dfsek.terra.api.world.biome.GenerationSettings;
|
||||
|
||||
public class UserDefinedGenerator implements Generator {
|
||||
public class UserDefinedGenerationSettings implements GenerationSettings {
|
||||
|
||||
private final NoiseSampler noise;
|
||||
private final NoiseSampler elevation;
|
||||
@@ -17,7 +15,7 @@ public class UserDefinedGenerator implements Generator {
|
||||
private final int blendStep;
|
||||
private final double blendWeight;
|
||||
|
||||
public UserDefinedGenerator(NoiseSampler noise, NoiseSampler elevation, NoiseSampler carving, NoiseSampler biomeNoise, double elevationWeight, int blendDistance, int blendStep, double blendWeight) {
|
||||
public UserDefinedGenerationSettings(NoiseSampler noise, NoiseSampler elevation, NoiseSampler carving, NoiseSampler biomeNoise, double elevationWeight, int blendDistance, int blendStep, double blendWeight) {
|
||||
this.noise = noise;
|
||||
this.elevation = elevation;
|
||||
this.carving = carving;
|
||||
Reference in New Issue
Block a user