Search in sources :

Example 1 with WorldGenBigMushroom

use of net.minecraft.world.gen.feature.WorldGenBigMushroom in project SpongeCommon by SpongePowered.

the class PopulatorObjectRegistryModule method registerDefaults.

@Override
public void registerDefaults() {
    // Populators
    register(new WorldGenDesertWells());
    // Trees
    register(new WorldGenTrees(false));
    register(new WorldGenBigTree(false));
    register(new WorldGenBirchTree(false, false));
    register(new WorldGenBirchTree(false, true));
    register(new WorldGenTaiga2(false));
    register(new WorldGenTaiga1());
    register(new WorldGenMegaPineTree(false, true));
    register(new WorldGenMegaPineTree(false, false));
    IBlockState jlog = Blocks.LOG.getDefaultState().withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.JUNGLE);
    IBlockState jleaf = Blocks.LEAVES.getDefaultState().withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.JUNGLE).withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
    IBlockState leaf = Blocks.LEAVES.getDefaultState().withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.JUNGLE).withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
    IWorldGenTrees trees = (IWorldGenTrees) new WorldGenTrees(false, 4, jlog, jleaf, true);
    trees.setId("minecraft:jungle");
    trees.setName("Jungle tree");
    trees.setMinHeight(VariableAmount.baseWithRandomAddition(4, 7));
    register((WorldGenTrees) trees);
    register(new WorldGenMegaJungle(false, 10, 20, jlog, jleaf));
    WorldGenShrub bush = new WorldGenShrub(jlog, leaf);
    register(bush);
    register(new WorldGenSavannaTree(false));
    register(new WorldGenCanopyTree(false));
    register(new WorldGenSwamp());
    // Mushrooms
    register(new WorldGenBigMushroom(Blocks.BROWN_MUSHROOM_BLOCK));
    register(new WorldGenBigMushroom(Blocks.RED_MUSHROOM_BLOCK));
}
Also used : IWorldGenTrees(org.spongepowered.common.interfaces.world.gen.IWorldGenTrees) WorldGenMegaPineTree(net.minecraft.world.gen.feature.WorldGenMegaPineTree) WorldGenMegaJungle(net.minecraft.world.gen.feature.WorldGenMegaJungle) WorldGenSwamp(net.minecraft.world.gen.feature.WorldGenSwamp) IBlockState(net.minecraft.block.state.IBlockState) WorldGenBirchTree(net.minecraft.world.gen.feature.WorldGenBirchTree) WorldGenCanopyTree(net.minecraft.world.gen.feature.WorldGenCanopyTree) WorldGenSavannaTree(net.minecraft.world.gen.feature.WorldGenSavannaTree) WorldGenDesertWells(net.minecraft.world.gen.feature.WorldGenDesertWells) WorldGenBigMushroom(net.minecraft.world.gen.feature.WorldGenBigMushroom) WorldGenTaiga1(net.minecraft.world.gen.feature.WorldGenTaiga1) WorldGenTaiga2(net.minecraft.world.gen.feature.WorldGenTaiga2) WorldGenShrub(net.minecraft.world.gen.feature.WorldGenShrub) WorldGenBigTree(net.minecraft.world.gen.feature.WorldGenBigTree) WorldGenTrees(net.minecraft.world.gen.feature.WorldGenTrees) IWorldGenTrees(org.spongepowered.common.interfaces.world.gen.IWorldGenTrees)

Example 2 with WorldGenBigMushroom

use of net.minecraft.world.gen.feature.WorldGenBigMushroom in project SpongeCommon by SpongePowered.

the class BigMushroomBuilder method build.

@Override
public BigMushroom build() throws IllegalStateException {
    BigMushroom populator = (BigMushroom) new WorldGenBigMushroom(Blocks.BROWN_MUSHROOM);
    populator.getTypes().clear();
    populator.getTypes().addAll(this.types);
    populator.setMushroomsPerChunk(this.count);
    populator.setSupplierOverride(this.override);
    return populator;
}
Also used : BigMushroom(org.spongepowered.api.world.gen.populator.BigMushroom) WorldGenBigMushroom(net.minecraft.world.gen.feature.WorldGenBigMushroom) WorldGenBigMushroom(net.minecraft.world.gen.feature.WorldGenBigMushroom)

Example 3 with WorldGenBigMushroom

use of net.minecraft.world.gen.feature.WorldGenBigMushroom in project SpongeCommon by SpongePowered.

the class MushroomTypeRegistryModule method registerDefaults.

@Override
public void registerDefaults() {
    register(new SpongeMushroomType("minecraft:brown", "brown", (PopulatorObject) new WorldGenBigMushroom(Blocks.BROWN_MUSHROOM_BLOCK)));
    register(new SpongeMushroomType("minecraft:red", "red", (PopulatorObject) new WorldGenBigMushroom(Blocks.RED_MUSHROOM_BLOCK)));
}
Also used : SpongeMushroomType(org.spongepowered.common.world.gen.type.SpongeMushroomType) PopulatorObject(org.spongepowered.api.world.gen.PopulatorObject) WorldGenBigMushroom(net.minecraft.world.gen.feature.WorldGenBigMushroom)

Aggregations

WorldGenBigMushroom (net.minecraft.world.gen.feature.WorldGenBigMushroom)3 IBlockState (net.minecraft.block.state.IBlockState)1 WorldGenBigTree (net.minecraft.world.gen.feature.WorldGenBigTree)1 WorldGenBirchTree (net.minecraft.world.gen.feature.WorldGenBirchTree)1 WorldGenCanopyTree (net.minecraft.world.gen.feature.WorldGenCanopyTree)1 WorldGenDesertWells (net.minecraft.world.gen.feature.WorldGenDesertWells)1 WorldGenMegaJungle (net.minecraft.world.gen.feature.WorldGenMegaJungle)1 WorldGenMegaPineTree (net.minecraft.world.gen.feature.WorldGenMegaPineTree)1 WorldGenSavannaTree (net.minecraft.world.gen.feature.WorldGenSavannaTree)1 WorldGenShrub (net.minecraft.world.gen.feature.WorldGenShrub)1 WorldGenSwamp (net.minecraft.world.gen.feature.WorldGenSwamp)1 WorldGenTaiga1 (net.minecraft.world.gen.feature.WorldGenTaiga1)1 WorldGenTaiga2 (net.minecraft.world.gen.feature.WorldGenTaiga2)1 WorldGenTrees (net.minecraft.world.gen.feature.WorldGenTrees)1 PopulatorObject (org.spongepowered.api.world.gen.PopulatorObject)1 BigMushroom (org.spongepowered.api.world.gen.populator.BigMushroom)1 IWorldGenTrees (org.spongepowered.common.interfaces.world.gen.IWorldGenTrees)1 SpongeMushroomType (org.spongepowered.common.world.gen.type.SpongeMushroomType)1