mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-18 23:01:03 +00:00
use column in ChunkInterpolator
This commit is contained in:
+12
-1
@@ -42,6 +42,13 @@ public class BiomeExtrusionProvider implements BiomeProvider {
|
||||
return delegate.getBaseBiome(x, z, seed);
|
||||
}
|
||||
|
||||
public Biome getBiome(int x, int y, int z, long seed, Biome biome) {
|
||||
for(Extrusion extrusion : extrusions) {
|
||||
biome = extrusion.extrude(biome, x, y, z, seed);
|
||||
}
|
||||
return biome;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Biome> getBiomes() {
|
||||
return biomes;
|
||||
@@ -51,8 +58,12 @@ public class BiomeExtrusionProvider implements BiomeProvider {
|
||||
return resolution;
|
||||
}
|
||||
|
||||
public BiomeProvider getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Column<Biome> getColumn(int x, int z, WorldProperties properties) {
|
||||
return new ExtrusionColumn(properties, this, x, z);
|
||||
return new ExtrusionColumn(properties, this, x, z, properties.getSeed());
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -12,14 +12,16 @@ public class ExtrusionColumn implements Column<Biome> {
|
||||
private final BiomeExtrusionProvider provider;
|
||||
private final int x, z;
|
||||
private final long seed;
|
||||
private final Column<Biome> delegate;
|
||||
|
||||
public ExtrusionColumn(WorldProperties worldProperties, BiomeExtrusionProvider provider, int x, int z) {
|
||||
public ExtrusionColumn(WorldProperties worldProperties, BiomeExtrusionProvider provider, int x, int z, long seed) {
|
||||
this.min = worldProperties.getMinHeight();
|
||||
this.max = worldProperties.getMaxHeight();
|
||||
this.provider = provider;
|
||||
this.x = x;
|
||||
this.z = z;
|
||||
this.seed = worldProperties.getSeed();
|
||||
this.delegate = provider.getDelegate().getColumn(x, z, seed, min, max);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -44,7 +46,7 @@ public class ExtrusionColumn implements Column<Biome> {
|
||||
|
||||
@Override
|
||||
public Biome get(int y) {
|
||||
return provider.getBiome(x, y, z, seed);
|
||||
return provider.getBiome(x, y, z, seed, delegate.get(y));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user