Search in sources :

Example 1 with IcePath

use of org.spongepowered.api.world.gen.populator.IcePath in project SpongeCommon by SpongePowered.

the class IcePathBuilder method build.

@Override
public IcePath build() throws IllegalStateException {
    IcePath pop = (IcePath) new WorldGenIcePath(4);
    pop.setRadius(this.radius);
    pop.setSectionsPerChunk(this.count);
    return pop;
}
Also used : WorldGenIcePath(net.minecraft.world.gen.feature.WorldGenIcePath) WorldGenIcePath(net.minecraft.world.gen.feature.WorldGenIcePath) IcePath(org.spongepowered.api.world.gen.populator.IcePath)

Example 2 with IcePath

use of org.spongepowered.api.world.gen.populator.IcePath in project SpongeCommon by SpongePowered.

the class MixinBiomeSnow method buildPopulators.

@Override
public void buildPopulators(World world, SpongeBiomeGenerationSettings gensettings) {
    if (this.superIcy) {
        IceSpike spike = IceSpike.builder().spikesPerChunk(3).build();
        gensettings.getPopulators().add(spike);
        IcePath path = IcePath.builder().perChunk(2).radius(VariableAmount.baseWithRandomAddition(2, 2)).build();
        gensettings.getPopulators().add(path);
    }
    super.buildPopulators(world, gensettings);
    BiomeDecorator theBiomeDecorator = this.decorator;
    gensettings.getPopulators().removeAll(gensettings.getPopulators(Forest.class));
    Forest.Builder forest = Forest.builder();
    forest.perChunk(VariableAmount.baseWithOptionalAddition(theBiomeDecorator.treesPerChunk, 2, 0.1));
    forest.type(BiomeTreeTypes.TALL_TAIGA.getPopulatorObject(), 1);
    gensettings.getPopulators().add(0, forest.build());
}
Also used : IceSpike(org.spongepowered.api.world.gen.populator.IceSpike) Forest(org.spongepowered.api.world.gen.populator.Forest) IcePath(org.spongepowered.api.world.gen.populator.IcePath) BiomeDecorator(net.minecraft.world.biome.BiomeDecorator)

Aggregations

IcePath (org.spongepowered.api.world.gen.populator.IcePath)2 BiomeDecorator (net.minecraft.world.biome.BiomeDecorator)1 WorldGenIcePath (net.minecraft.world.gen.feature.WorldGenIcePath)1 Forest (org.spongepowered.api.world.gen.populator.Forest)1 IceSpike (org.spongepowered.api.world.gen.populator.IceSpike)1