unimplement PropertyHolder

This commit is contained in:
dfsek 2021-12-02 18:08:08 -07:00
parent 1c7c7af105
commit 71a39ba05b
3 changed files with 2 additions and 8 deletions

View File

@ -38,7 +38,6 @@ import com.dfsek.terra.api.world.chunk.generation.util.Palette;
public class NoiseChunkGenerator3D implements ChunkGenerator {
private final Context context = new Context();
private final ConfigPack configPack;
private final Platform platform;
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());
} else return air;
}
@Override
public Context getContext() {
return context;
}
}

View File

@ -70,7 +70,7 @@ public class CheckFunction implements Function<String> {
private String apply(Vector3 vector, WritableWorld world) {
int y = vector.getBlockY();
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);
if(comp > 0) return "LAND"; // If noise val is greater than zero, location will always be land.

View File

@ -24,7 +24,7 @@ import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
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,
int chunkZ, int chunkX);
Sampler createSampler(int chunkX, int chunkZ, BiomeProvider provider, World world, int elevationSmooth);