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

Examples of org.spout.vanilla.world.generator.normal.object.DungeonObject


  @Override
  public void populate(Chunk chunk, Random random) {
    if (chunk.getY() != 4) {
      return;
    }
    final DungeonObject dungeon = new DungeonObject();
    dungeon.setRandom(random);
    final World world = chunk.getWorld();
    for (byte count = 0; count < attempts; count++) {
      final int x = chunk.getBlockX(random);
      final int z = chunk.getBlockZ(random);
      final int y = random.nextInt(128);
      dungeon.randomize();
      if (dungeon.canPlaceObject(world, x, y, z)) {
        dungeon.placeObject(world, x, y, z);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.spout.vanilla.world.generator.normal.object.DungeonObject

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.