Package org.spout.vanilla.world.generator.normal.object.tree

Examples of org.spout.vanilla.world.generator.normal.object.tree.TreeObject


    }
    final World world = chunk.getWorld();
    final Biome decorating = chunk.getBiome(7, 7, 7);
    final byte amount = factory.amount(random);
    for (byte count = 0; count < amount; count++) {
      final TreeObject tree = factory.make(random);
      tree.setRandom(random);
      tree.randomize();
      final int x = chunk.getBlockX(random);
      final int z = chunk.getBlockZ(random);
      if (decorating != world.getBiome(x, 64, z)) {
        continue;
      }
      final int y = getHighestWorkableBlock(world, x, z);
      if (y == -1) {
        continue;
      }
      if (tree.canPlaceObject(world, x, y, z)) {
        tree.placeObject(world, x, y, z);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.spout.vanilla.world.generator.normal.object.tree.TreeObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.