cn.nukkit.level.generator.object.tree.ObjectJungleBigTree Java Examples
The following examples show how to use
cn.nukkit.level.generator.object.tree.ObjectJungleBigTree.
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: JungleBigTreePopulator.java From Jupiter with GNU General Public License v3.0 | 6 votes |
@Override public void populate(ChunkManager level, int chunkX, int chunkZ, NukkitRandom random) { this.level = level; int amount = random.nextBoundedInt(this.randomAmount + 1) + this.baseAmount; Vector3 v = new Vector3(); for (int i = 0; i < amount; ++i) { int x = NukkitMath.randomRange(random, chunkX << 4, (chunkX << 4) + 15); int z = NukkitMath.randomRange(random, chunkZ << 4, (chunkZ << 4) + 15); int y = this.getHighestWorkableBlock(x, z); if (y == -1) { continue; } new ObjectJungleBigTree(10, 20, new BlockWood(BlockWood.JUNGLE), new BlockLeaves(BlockLeaves.JUNGLE)).generate(this.level, random, v.setComponents(x, y, z)); } }
Example #2
Source File: JungleBigTreePopulator.java From Nukkit with GNU General Public License v3.0 | 6 votes |
@Override public void populate(ChunkManager level, int chunkX, int chunkZ, NukkitRandom random, FullChunk chunk) { this.level = level; int amount = random.nextBoundedInt(this.randomAmount + 1) + this.baseAmount; Vector3 v = new Vector3(); for (int i = 0; i < amount; ++i) { int x = NukkitMath.randomRange(random, chunkX << 4, (chunkX << 4) + 15); int z = NukkitMath.randomRange(random, chunkZ << 4, (chunkZ << 4) + 15); int y = this.getHighestWorkableBlock(x, z); if (y == -1) { continue; } new ObjectJungleBigTree(10, 20, Block.get(BlockID.WOOD, BlockWood.JUNGLE), Block.get(BlockID.LEAVES, BlockLeaves.JUNGLE)).generate(this.level, random, v.setComponents(x, y, z)); } }
Example #3
Source File: JungleBigTreePopulator.java From Nukkit with GNU General Public License v3.0 | 6 votes |
@Override public void populate(ChunkManager level, int chunkX, int chunkZ, NukkitRandom random) { this.level = level; int amount = random.nextBoundedInt(this.randomAmount + 1) + this.baseAmount; Vector3 v = new Vector3(); for (int i = 0; i < amount; ++i) { int x = NukkitMath.randomRange(random, chunkX << 4, (chunkX << 4) + 15); int z = NukkitMath.randomRange(random, chunkZ << 4, (chunkZ << 4) + 15); int y = this.getHighestWorkableBlock(x, z); if (y == -1) { continue; } new ObjectJungleBigTree(10, 20, new BlockWood(BlockWood.JUNGLE), new BlockLeaves(BlockLeaves.JUNGLE)).generate(this.level, random, v.setComponents(x, y, z)); } }