Package org.spout.vanilla.world.generator.structure

Examples of org.spout.vanilla.world.generator.structure.StructurePiece.place()


    final BoundingBox boundingBox = temple.getBoundingBox();
    y = getAverageHeight(w, x, z, (int) boundingBox.getXSize(), (int) boundingBox.getZSize());
    temple.setPosition(new Point(w, x, y, z));
    temple.setRotation(Quaternionf.fromAngleDegAxis(random.nextInt(4) * 90, 0, 1, 0));
    if (temple.canPlace()) {
      temple.place();
    }
  }

  private StructurePiece getTemple(Biome biome) {
    final StructurePiece temple;
View Full Code Here


    while (!activeBranches.isEmpty()) {
      final StructurePiece active = activeBranches.poll();
      final BoundingBox activeBox = active.getBoundingBox();
      if (!collides(activeBox, lastBoxes.remove(active), placed) && active.canPlace()
          && active.getPosition().getY() >= 10) {
        active.place();
        if (++count > size) {
          return;
        }
        placed.add(activeBox);
        final List<StructurePiece> next = active.getNextPieces();
View Full Code Here

    while (!activeBranches.isEmpty()) {
      final StructurePiece active = activeBranches.poll();
      final BoundingBox activeBox = active.getBoundingBox();
      if (!collides(activeBox, lastBoxes.remove(active), placed) && active.canPlace()
          && active.getPosition().getY() >= 10) {
        active.place();
        if (++count > size) {
          final List<StructurePiece> ends = new ArrayList<StructurePiece>();
          final Iterator<StructurePiece> iterator = activeBranches.iterator();
          while (iterator.hasNext()) {
            final StructurePiece stop = iterator.next();
View Full Code Here

    while (!activeBranches.isEmpty()) {
      final StructurePiece active = activeBranches.poll();
      final BoundingBox activeBox = active.getBoundingBox();
      if (!collides(activeBox, lastBoxes.remove(active), placed) && active.canPlace()
          && active.getPosition().getY() >= 10) {
        active.place();
        if (++count > size) {
          return;
        }
        placed.add(activeBox);
        final List<StructurePiece> next = active.getNextPieces();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.