use of org.terasology.world.generation.facets.SeaLevelFacet in project Terasology by MovingBlocks.
the class DefaultFloraProvider method getFilters.
protected List<Predicate<Vector3i>> getFilters(GeneratingRegion region) {
List<Predicate<Vector3i>> filters = Lists.newArrayList();
SeaLevelFacet seaLevel = region.getRegionFacet(SeaLevelFacet.class);
filters.add(PositionFilters.minHeight(seaLevel.getSeaLevel()));
filters.add(PositionFilters.probability(densityNoiseGen, configuration.density));
return filters;
}
use of org.terasology.world.generation.facets.SeaLevelFacet in project Terasology by MovingBlocks.
the class SeaLevelProvider method process.
@Override
public void process(GeneratingRegion region) {
Border3D border = region.getBorderForFacet(SeaLevelFacet.class);
SeaLevelFacet facet = new SeaLevelFacet(region.getRegion(), border);
facet.setSeaLevel(seaLevel);
region.setRegionFacet(SeaLevelFacet.class, facet);
}
Aggregations