Java Code Examples for cn.nukkit.block.BlockSapling#SPRUCE

The following examples show how to use cn.nukkit.block.BlockSapling#SPRUCE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TaigaBiome.java    From Jupiter with GNU General Public License v3.0 6 votes vote down vote up
public TaigaBiome() {
    super();

    PopulatorGrass grass = new PopulatorGrass();
    grass.setBaseAmount(6);
    this.addPopulator(grass);

    PopulatorTree trees = new PopulatorTree(BlockSapling.SPRUCE);
    trees.setBaseAmount(10);
    this.addPopulator(trees);

    PopulatorTallGrass tallGrass = new PopulatorTallGrass();
    tallGrass.setBaseAmount(1);

    this.addPopulator(tallGrass);

    this.setElevation(63, 81);

    this.temperature = 0.05;
    this.rainfall = 0.8;
}
 
Example 2
Source File: ObjectTree.java    From Nukkit with GNU General Public License v3.0 6 votes vote down vote up
public static void growTree(ChunkManager level, int x, int y, int z, NukkitRandom random, int type) {
    ObjectTree tree;
    switch (type) {
        case BlockSapling.SPRUCE:
            tree = new ObjectSpruceTree();
            break;
        case BlockSapling.BIRCH:
            tree = new ObjectBirchTree();
            break;
        case BlockSapling.JUNGLE:
            tree = new ObjectJungleTree();
            break;
        case BlockSapling.BIRCH_TALL:
            tree = new ObjectTallBirchTree();
            break;
        case BlockSapling.OAK:
        default:
            tree = new ObjectOakTree();
            //todo: more complex treeeeeeeeeeeeeeeee
            break;
    }

    if (tree.canPlaceObject(level, x, y, z, random)) {
        tree.placeObject(level, x, y, z, random);
    }
}
 
Example 3
Source File: TaigaBiome.java    From Nukkit with GNU General Public License v3.0 6 votes vote down vote up
public TaigaBiome() {
    super();

    PopulatorGrass grass = new PopulatorGrass();
    grass.setBaseAmount(6);
    this.addPopulator(grass);

    PopulatorTree trees = new PopulatorTree(BlockSapling.SPRUCE);
    trees.setBaseAmount(10);
    this.addPopulator(trees);

    PopulatorTallGrass tallGrass = new PopulatorTallGrass();
    tallGrass.setBaseAmount(1);

    this.addPopulator(tallGrass);

    this.setElevation(63, 81);

    this.temperature = 0.05;
    this.rainfall = 0.8;
}
 
Example 4
Source File: IcePlainsBiome.java    From Jupiter with GNU General Public License v3.0 5 votes vote down vote up
public IcePlainsBiome() {
    super();
    PopulatorTallGrass tallGrass = new PopulatorTallGrass();
    tallGrass.setBaseAmount(5);

    PopulatorTree trees = new PopulatorTree(BlockSapling.SPRUCE);
    trees.setBaseAmount(1);
    trees.setRandomAmount(1);

    this.addPopulator(tallGrass);
    this.addPopulator(trees);
    this.setElevation(63, 74);
    this.temperature = 0D;
    this.rainfall = 0.5D;
}
 
Example 5
Source File: ObjectTree.java    From Jupiter with GNU General Public License v3.0 5 votes vote down vote up
public static void growTree(ChunkManager level, int x, int y, int z, NukkitRandom random, int type) {
    ObjectTree tree;
    switch (type) {
        case BlockSapling.SPRUCE:
            if (random.nextBoundedInt(39) == 0) {
                tree = new ObjectSpruceTree();
            } else {
                tree = new ObjectSpruceTree();
            }
            break;
        case BlockSapling.BIRCH:
            if (random.nextBoundedInt(39) == 0) {
                tree = new ObjectTallBirchTree();
            } else {
                tree = new ObjectBirchTree();
            }
            break;
        case BlockSapling.JUNGLE:
            tree = new ObjectJungleTree();
            break;
        case BlockSapling.OAK:
        default:
            tree = new ObjectOakTree();
            //todo: more complex treeeeeeeeeeeeeeeee
            break;
    }

    if (tree.canPlaceObject(level, x, y, z, random)) {
        tree.placeObject(level, x, y, z, random);
    }
}
 
Example 6
Source File: ExtremeHillsBiome.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
public ExtremeHillsBiome(boolean tree) {
    super();

    if (tree) {
        PopulatorTree trees = new PopulatorTree(BlockSapling.SPRUCE);
        trees.setBaseAmount(2);
        trees.setRandomAmount(2);
        this.addPopulator(trees);
    }

    this.setBaseHeight(1f);
    this.setHeightVariation(0.5f);
}
 
Example 7
Source File: TaigaBiome.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
public TaigaBiome() {
    super();

    PopulatorTree trees = new PopulatorTree(BlockSapling.SPRUCE);
    trees.setBaseAmount(10);
    this.addPopulator(trees);

    this.setBaseHeight(0.2f);
    this.setHeightVariation(0.2f);
}
 
Example 8
Source File: IcePlainsBiome.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
public IcePlainsBiome() {
    super();
    PopulatorTallGrass tallGrass = new PopulatorTallGrass();
    tallGrass.setBaseAmount(5);

    PopulatorTree trees = new PopulatorTree(BlockSapling.SPRUCE);
    trees.setBaseAmount(1);
    trees.setRandomAmount(1);

    this.addPopulator(tallGrass);
    this.addPopulator(trees);
    this.setElevation(63, 74);
    this.temperature = 0D;
    this.rainfall = 0.5D;
}
 
Example 9
Source File: ObjectTree.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
public static void growTree(ChunkManager level, int x, int y, int z, NukkitRandom random, int type) {
    ObjectTree tree;
    switch (type) {
        case BlockSapling.SPRUCE:
            if (random.nextBoundedInt(39) == 0) {
                tree = new ObjectSpruceTree();
            } else {
                tree = new ObjectSpruceTree();
            }
            break;
        case BlockSapling.BIRCH:
            if (random.nextBoundedInt(39) == 0) {
                tree = new ObjectTallBirchTree();
            } else {
                tree = new ObjectBirchTree();
            }
            break;
        case BlockSapling.JUNGLE:
            tree = new ObjectJungleTree();
            break;
        case BlockSapling.OAK:
        default:
            tree = new ObjectOakTree();
            //todo: more complex treeeeeeeeeeeeeeeee
            break;
    }

    if (tree.canPlaceObject(level, x, y, z, random)) {
        tree.placeObject(level, x, y, z, random);
    }
}
 
Example 10
Source File: SpruceBigTreePopulator.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
public SpruceBigTreePopulator() {
    this(BlockSapling.SPRUCE);
}
 
Example 11
Source File: SpruceMegaTreePopulator.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
public SpruceMegaTreePopulator() {
    this(BlockSapling.SPRUCE);
}
 
Example 12
Source File: IcePlainsBiome.java    From Nukkit with GNU General Public License v3.0 3 votes vote down vote up
public IcePlainsBiome() {
    super();

    PopulatorTree trees = new PopulatorTree(BlockSapling.SPRUCE);
    trees.setBaseAmount(0);
    trees.setRandomAmount(1);
    this.addPopulator(trees);



    this.setBaseHeight(0.125f);
    this.setHeightVariation(0.05f);
}