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

Examples of org.spout.vanilla.world.generator.structure.StructurePiece.BoundingBox


  public void placeObject(World w, int x, int y, int z) {
    final StructurePiece temple = getTemple(w.getBiome(x, y, z));
    if (temple == null) {
      return;
    }
    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();
    }
View Full Code Here


    activeBranches.add(room);
    final byte size = (byte) (random.nextInt(MAX_SIZE_RAND + 1) + MAX_SIZE_BASE);
    byte count = 0;
    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;
View Full Code Here

    activeBranches.add(corridor);
    final int size = random.nextInt(MAX_SIZE_RAND + 1) + MAX_SIZE_BASE;
    byte count = 0;
    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>();
View Full Code Here

    activeBranches.add(corridor);
    final int size = random.nextInt(MAX_SIZE_RAND + 1) + MAX_SIZE_BASE;
    byte count = 0;
    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;
View Full Code Here

TOP

Related Classes of org.spout.vanilla.world.generator.structure.StructurePiece.BoundingBox

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.