mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-04 00:45:57 +00:00
unimplement PropertyHolder
This commit is contained in:
parent
1c7c7af105
commit
71a39ba05b
@ -38,7 +38,6 @@ import com.dfsek.terra.api.world.chunk.generation.util.Palette;
|
|||||||
|
|
||||||
|
|
||||||
public class NoiseChunkGenerator3D implements ChunkGenerator {
|
public class NoiseChunkGenerator3D implements ChunkGenerator {
|
||||||
private final Context context = new Context();
|
|
||||||
private final ConfigPack configPack;
|
private final ConfigPack configPack;
|
||||||
private final Platform platform;
|
private final Platform platform;
|
||||||
private final List<GenerationStage> generationStages = new ArrayList<>();
|
private final List<GenerationStage> generationStages = new ArrayList<>();
|
||||||
@ -140,9 +139,4 @@ public class NoiseChunkGenerator3D implements ChunkGenerator {
|
|||||||
return paletteInfo.getOcean().get(paletteInfo.getSeaLevel() - y, x, y, z, world.getSeed());
|
return paletteInfo.getOcean().get(paletteInfo.getSeaLevel() - y, x, y, z, world.getSeed());
|
||||||
} else return air;
|
} else return air;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Context getContext() {
|
|
||||||
return context;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ public class CheckFunction implements Function<String> {
|
|||||||
private String apply(Vector3 vector, WritableWorld world) {
|
private String apply(Vector3 vector, WritableWorld world) {
|
||||||
int y = vector.getBlockY();
|
int y = vector.getBlockY();
|
||||||
if(y >= world.getMaxHeight() || y < 0) return "AIR";
|
if(y >= world.getMaxHeight() || y < 0) return "AIR";
|
||||||
SamplerProvider cache = world.getConfig().getSamplerCache();
|
SamplerProvider cache = world.getGenerator().getSamplerCache();
|
||||||
double comp = sample(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ(), cache);
|
double comp = sample(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ(), cache);
|
||||||
|
|
||||||
if(comp > 0) return "LAND"; // If noise val is greater than zero, location will always be land.
|
if(comp > 0) return "LAND"; // If noise val is greater than zero, location will always be land.
|
||||||
|
@ -24,7 +24,7 @@ import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
|||||||
import com.dfsek.terra.api.world.chunk.generation.stage.GenerationStage;
|
import com.dfsek.terra.api.world.chunk.generation.stage.GenerationStage;
|
||||||
|
|
||||||
|
|
||||||
public interface ChunkGenerator extends PropertyHolder {
|
public interface ChunkGenerator {
|
||||||
void generateChunkData(@NotNull ProtoChunk chunk, @NotNull WritableWorld world,
|
void generateChunkData(@NotNull ProtoChunk chunk, @NotNull WritableWorld world,
|
||||||
int chunkZ, int chunkX);
|
int chunkZ, int chunkX);
|
||||||
Sampler createSampler(int chunkX, int chunkZ, BiomeProvider provider, World world, int elevationSmooth);
|
Sampler createSampler(int chunkX, int chunkZ, BiomeProvider provider, World world, int elevationSmooth);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user