Search in sources :

Example 1 with WorldGenCanopyTree

use of net.minecraft.world.gen.feature.WorldGenCanopyTree 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 WorldGenCanopyTree

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

the class BiomeTreeTypeRegistryModule method registerDefaults.

@Override
public void registerDefaults() {
    register(create("oak", new WorldGenTrees(false), new WorldGenBigTree(false)));
    register(create("birch", new WorldGenBirchTree(false, false), new WorldGenBirchTree(false, true)));
    WorldGenMegaPineTree tall_megapine = new WorldGenMegaPineTree(false, true);
    WorldGenMegaPineTree megapine = new WorldGenMegaPineTree(false, false);
    register(create("tall_taiga", new WorldGenTaiga2(false), tall_megapine));
    register(create("pointy_taiga", new WorldGenTaiga1(), megapine));
    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.setMinHeight(VariableAmount.baseWithRandomAddition(4, 7));
    WorldGenMegaJungle mega = new WorldGenMegaJungle(false, 10, 20, jlog, jleaf);
    register(create("jungle", (WorldGenTrees) trees, mega));
    WorldGenShrub bush = new WorldGenShrub(jlog, leaf);
    register(create("jungle_bush", bush, null));
    register(create("savanna", new WorldGenSavannaTree(false), null));
    register(create("canopy", new WorldGenCanopyTree(false), null));
    register(create("swamp", new WorldGenSwamp(), null));
}
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) 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)

Aggregations

IBlockState (net.minecraft.block.state.IBlockState)2 WorldGenBigTree (net.minecraft.world.gen.feature.WorldGenBigTree)2 WorldGenBirchTree (net.minecraft.world.gen.feature.WorldGenBirchTree)2 WorldGenCanopyTree (net.minecraft.world.gen.feature.WorldGenCanopyTree)2 WorldGenMegaJungle (net.minecraft.world.gen.feature.WorldGenMegaJungle)2 WorldGenMegaPineTree (net.minecraft.world.gen.feature.WorldGenMegaPineTree)2 WorldGenSavannaTree (net.minecraft.world.gen.feature.WorldGenSavannaTree)2 WorldGenShrub (net.minecraft.world.gen.feature.WorldGenShrub)2 WorldGenSwamp (net.minecraft.world.gen.feature.WorldGenSwamp)2 WorldGenTaiga1 (net.minecraft.world.gen.feature.WorldGenTaiga1)2 WorldGenTaiga2 (net.minecraft.world.gen.feature.WorldGenTaiga2)2 WorldGenTrees (net.minecraft.world.gen.feature.WorldGenTrees)2 IWorldGenTrees (org.spongepowered.common.interfaces.world.gen.IWorldGenTrees)2 WorldGenBigMushroom (net.minecraft.world.gen.feature.WorldGenBigMushroom)1 WorldGenDesertWells (net.minecraft.world.gen.feature.WorldGenDesertWells)1