cn.nukkit.block.BlockSapling Java Examples
The following examples show how to use
cn.nukkit.block.BlockSapling.
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 |
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: SavannaBiome.java From Jupiter with GNU General Public License v3.0 | 6 votes |
public SavannaBiome() { super(); SavannaTreePopulator tree = new SavannaTreePopulator(BlockSapling.ACACIA); tree.setBaseAmount(1); PopulatorTallGrass tallGrass = new PopulatorTallGrass(); tallGrass.setBaseAmount(20); PopulatorGrass grass = new PopulatorGrass(); grass.setBaseAmount(20); PopulatorFlower flower = new PopulatorFlower(); flower.setBaseAmount(4); this.addPopulator(tallGrass); this.addPopulator(grass); this.addPopulator(tree); this.addPopulator(flower); this.setElevation(62, 68); this.temperature = 1.2f; this.rainfall = 0.0f; }
Example #3
Source File: SavannaBiome.java From Nukkit with GNU General Public License v3.0 | 6 votes |
public SavannaBiome() { super(); SavannaTreePopulator tree = new SavannaTreePopulator(BlockSapling.ACACIA); tree.setBaseAmount(1); PopulatorTallGrass tallGrass = new PopulatorTallGrass(); tallGrass.setBaseAmount(20); PopulatorGrass grass = new PopulatorGrass(); grass.setBaseAmount(20); PopulatorFlower flower = new PopulatorFlower(); flower.setBaseAmount(4); this.addPopulator(tallGrass); this.addPopulator(grass); this.addPopulator(tree); this.addPopulator(flower); this.setElevation(62, 68); this.temperature = 1.2f; this.rainfall = 0.0f; }
Example #4
Source File: TaigaBiome.java From Nukkit with GNU General Public License v3.0 | 6 votes |
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 #5
Source File: ForestBiome.java From Nukkit with GNU General Public License v3.0 | 6 votes |
public ForestBiome(int type) { super(); this.type = type; PopulatorTree trees = new PopulatorTree(type == TYPE_BIRCH_TALL ? BlockSapling.BIRCH_TALL : BlockSapling.BIRCH); trees.setBaseAmount(type == TYPE_NORMAL ? 3 : 6); this.addPopulator(trees); if (type == TYPE_NORMAL) { //normal forest biomes have both oak and birch trees trees = new PopulatorTree(BlockSapling.OAK); trees.setBaseAmount(3); this.addPopulator(trees); } }
Example #6
Source File: ObjectTree.java From Nukkit with GNU General Public License v3.0 | 6 votes |
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 #7
Source File: ObjectTree.java From Nukkit with GNU General Public License v3.0 | 5 votes |
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 #8
Source File: ForestBiome.java From Jupiter with GNU General Public License v3.0 | 5 votes |
public ForestBiome(int type) { super(); this.type = type; PopulatorTree trees = new PopulatorTree(type == TYPE_BIRCH ? BlockSapling.BIRCH : BlockSapling.OAK); trees.setBaseAmount(5); this.addPopulator(trees); PopulatorGrass grass = new PopulatorGrass(); grass.setBaseAmount(30); this.addPopulator(grass); PopulatorTallGrass tallGrass = new PopulatorTallGrass(); tallGrass.setBaseAmount(3); this.addPopulator(tallGrass); this.setElevation(63, 81); if (type == TYPE_BIRCH) { this.temperature = 0.5; this.rainfall = 0.5; } else { this.temperature = 0.7; this.temperature = 0.8; } }
Example #9
Source File: IcePlainsBiome.java From Nukkit with GNU General Public License v3.0 | 5 votes |
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 #10
Source File: ForestBiome.java From Nukkit with GNU General Public License v3.0 | 5 votes |
public ForestBiome(int type) { super(); this.type = type; PopulatorTree trees = new PopulatorTree(type == TYPE_BIRCH ? BlockSapling.BIRCH : BlockSapling.OAK); trees.setBaseAmount(5); this.addPopulator(trees); PopulatorGrass grass = new PopulatorGrass(); grass.setBaseAmount(30); this.addPopulator(grass); PopulatorTallGrass tallGrass = new PopulatorTallGrass(); tallGrass.setBaseAmount(3); this.addPopulator(tallGrass); this.setElevation(63, 81); if (type == TYPE_BIRCH) { this.temperature = 0.5; this.rainfall = 0.5; } else { this.temperature = 0.7; this.temperature = 0.8; } }
Example #11
Source File: TaigaBiome.java From Nukkit with GNU General Public License v3.0 | 5 votes |
public TaigaBiome() { super(); PopulatorTree trees = new PopulatorTree(BlockSapling.SPRUCE); trees.setBaseAmount(10); this.addPopulator(trees); this.setBaseHeight(0.2f); this.setHeightVariation(0.2f); }
Example #12
Source File: SavannaBiome.java From Nukkit with GNU General Public License v3.0 | 5 votes |
public SavannaBiome() { super(); SavannaTreePopulator tree = new SavannaTreePopulator(BlockSapling.ACACIA); tree.setBaseAmount(1); this.addPopulator(tree); this.setBaseHeight(0.125f); this.setHeightVariation(0.05f); }
Example #13
Source File: ExtremeHillsBiome.java From Nukkit with GNU General Public License v3.0 | 5 votes |
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 #14
Source File: MesaPlateauFBiome.java From Nukkit with GNU General Public License v3.0 | 5 votes |
public MesaPlateauFBiome() { super(); PopulatorTree tree = new PopulatorTree(BlockSapling.OAK); tree.setBaseAmount(2); tree.setRandomAmount(1); this.addPopulator(tree); }
Example #15
Source File: IcePlainsBiome.java From Jupiter with GNU General Public License v3.0 | 5 votes |
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 #16
Source File: ObjectTree.java From Jupiter with GNU General Public License v3.0 | 5 votes |
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 #17
Source File: DarkOakTreePopulator.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public DarkOakTreePopulator() { this(BlockSapling.DARK_OAK); }
Example #18
Source File: JungleBigTreePopulator.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public JungleBigTreePopulator() { this(BlockSapling.JUNGLE); }
Example #19
Source File: DarkOakTreePopulator.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public DarkOakTreePopulator() { this(BlockSapling.DARK_OAK); }
Example #20
Source File: SwampTreePopulator.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public SwampTreePopulator() { this(BlockSapling.OAK); }
Example #21
Source File: JungleTreePopulator.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public JungleTreePopulator() { this(BlockSapling.JUNGLE); }
Example #22
Source File: SavannaTreePopulator.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public SavannaTreePopulator() { this(BlockSapling.ACACIA); }
Example #23
Source File: PopulatorTree.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public PopulatorTree() { this(BlockSapling.OAK); }
Example #24
Source File: PopulatorTree.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public PopulatorTree() { this(BlockSapling.OAK); }
Example #25
Source File: SavannaTreePopulator.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public SavannaTreePopulator() { this(BlockSapling.ACACIA); }
Example #26
Source File: JungleTreePopulator.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public JungleTreePopulator() { this(BlockSapling.JUNGLE); }
Example #27
Source File: SwampTreePopulator.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public SwampTreePopulator() { this(BlockSapling.OAK); }
Example #28
Source File: JungleTreePopulator.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public JungleTreePopulator() { this(BlockSapling.JUNGLE); }
Example #29
Source File: JungleBigTreePopulator.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public JungleBigTreePopulator() { this(BlockSapling.JUNGLE); }
Example #30
Source File: PopulatorTree.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public PopulatorTree() { this(BlockSapling.OAK); }