Search in sources :

Example 1 with NetherFire

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

the class MixinBiomeHell method buildPopulators.

@Override
public void buildPopulators(World world, SpongeBiomeGenerationSettings gensettings) {
    RandomBlock lava1 = RandomBlock.builder().block((BlockState) Blocks.FLOWING_LAVA.getDefaultState()).perChunk(8).height(VariableAmount.baseWithRandomAddition(4, 120)).placementTarget(WorldGenConstants.HELL_LAVA).build();
    gensettings.getPopulators().add(lava1);
    NetherFire fire = NetherFire.builder().perChunk(VariableAmount.baseWithRandomAddition(1, VariableAmount.baseWithRandomAddition(1, 10))).perCluster(64).build();
    gensettings.getPopulators().add(fire);
    Glowstone glowstone1 = Glowstone.builder().blocksPerCluster(1500).clusterHeight(VariableAmount.baseWithRandomAddition(-11, 12)).perChunk(VariableAmount.baseWithRandomAddition(0, VariableAmount.baseWithRandomAddition(1, 10))).height(VariableAmount.baseWithRandomAddition(4, 120)).build();
    gensettings.getPopulators().add(glowstone1);
    Glowstone glowstone2 = Glowstone.builder().blocksPerCluster(1500).clusterHeight(VariableAmount.baseWithRandomAddition(0, 12)).perChunk(10).height(VariableAmount.baseWithRandomAddition(0, 128)).build();
    gensettings.getPopulators().add(glowstone2);
    ChanceTable<MushroomType> types = new ChanceTable<>();
    types.add(new WeightedObject<>(MushroomTypes.BROWN, 1));
    types.add(new EmptyObject<>(1));
    HellMushroomPopulator smallMushroom = new HellMushroomPopulator();
    smallMushroom.setMushroomsPerChunk(1);
    smallMushroom.getTypes().addAll(types);
    gensettings.getPopulators().add(smallMushroom);
    ChanceTable<MushroomType> types2 = new ChanceTable<>();
    types.add(new WeightedObject<>(MushroomTypes.RED, 1));
    types.add(new EmptyObject<>(1));
    HellMushroomPopulator smallMushroom2 = new HellMushroomPopulator();
    smallMushroom2.setMushroomsPerChunk(1);
    smallMushroom2.getTypes().addAll(types2);
    gensettings.getPopulators().add(smallMushroom2);
    Ore quartz = Ore.builder().height(VariableAmount.baseWithRandomAddition(10, 108)).ore(BlockTypes.QUARTZ_ORE.getDefaultState()).perChunk(16).placementCondition((o) -> o != null && o.getType() == BlockTypes.NETHERRACK).size(14).build();
    gensettings.getPopulators().add(quartz);
    int halfSeaLevel = world.getSeaLevel() / 2 + 1;
    Ore magma = Ore.builder().height(VariableAmount.baseWithRandomAddition(halfSeaLevel - 5, 10)).ore(BlockTypes.MAGMA.getDefaultState()).perChunk(4).placementCondition((o) -> o != null && o.getType() == BlockTypes.NETHERRACK).size(33).build();
    gensettings.getPopulators().add(magma);
    RandomBlock lava2 = RandomBlock.builder().block((BlockState) Blocks.FLOWING_LAVA.getDefaultState()).perChunk(16).height(VariableAmount.baseWithRandomAddition(10, 108)).placementTarget(WorldGenConstants.HELL_LAVA_ENCLOSED).build();
    gensettings.getPopulators().add(lava2);
}
Also used : RandomBlock(org.spongepowered.api.world.gen.populator.RandomBlock) Glowstone(org.spongepowered.api.world.gen.populator.Glowstone) Ore(org.spongepowered.api.world.gen.populator.Ore) ChanceTable(org.spongepowered.api.util.weighted.ChanceTable) HellMushroomPopulator(org.spongepowered.common.world.gen.populators.HellMushroomPopulator) MushroomType(org.spongepowered.api.world.gen.type.MushroomType) NetherFire(org.spongepowered.api.world.gen.populator.NetherFire)

Example 2 with NetherFire

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

the class NetherFireBuilder method build.

@Override
public NetherFire build() throws IllegalStateException {
    NetherFire pop = (NetherFire) new WorldGenFire();
    pop.setFirePerCluster(this.cluster);
    pop.setClustersPerChunk(this.count);
    return pop;
}
Also used : WorldGenFire(net.minecraft.world.gen.feature.WorldGenFire) NetherFire(org.spongepowered.api.world.gen.populator.NetherFire)

Aggregations

NetherFire (org.spongepowered.api.world.gen.populator.NetherFire)2 WorldGenFire (net.minecraft.world.gen.feature.WorldGenFire)1 ChanceTable (org.spongepowered.api.util.weighted.ChanceTable)1 Glowstone (org.spongepowered.api.world.gen.populator.Glowstone)1 Ore (org.spongepowered.api.world.gen.populator.Ore)1 RandomBlock (org.spongepowered.api.world.gen.populator.RandomBlock)1 MushroomType (org.spongepowered.api.world.gen.type.MushroomType)1 HellMushroomPopulator (org.spongepowered.common.world.gen.populators.HellMushroomPopulator)1