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

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


      piece.setRotation(Quaternionf.fromAngleDegAxis(90, 0, 1, 0).mul(rotation));
    } else {
      piece.setPosition(position.add(rotate(-1, 0, 0)));
      piece.setRotation(Quaternionf.fromAngleDegAxis(-90, 0, 1, 0).mul(rotation));
    }
    piece.randomize();
    return Lists.newArrayList(piece);
  }

  @Override
  public BoundingBox getBoundingBox() {
View Full Code Here


  @Override
  public List<StructurePiece> getNextPieces() {
    final StructurePiece piece = getNextPiece();
    piece.setPosition(position.add(rotate(0, 0, 13)));
    piece.setRotation(rotation);
    piece.randomize();
    return Lists.newArrayList(piece);
  }

  @Override
  public BoundingBox getBoundingBox() {
View Full Code Here

  @Override
  public List<StructurePiece> getNextPieces() {
    final StructurePiece piece = getNextPiece();
    piece.setPosition(position.add(rotate(0, -6, 8)));
    piece.setRotation(rotation);
    piece.randomize();
    return Lists.newArrayList(piece);
  }

  @Override
  public BoundingBox getBoundingBox() {
View Full Code Here

  public List<StructurePiece> getNextPieces() {
    final List<StructurePiece> pieces = new ArrayList<StructurePiece>();
    final StructurePiece nextFront = getNextPiece();
    nextFront.setPosition(position.add(rotate(0, 0, 11)));
    nextFront.setRotation(rotation);
    nextFront.randomize();
    pieces.add(nextFront);
    final StructurePiece nextRight = getNextPiece();
    nextRight.setPosition(position.add(rotate(-4, 0, 3)));
    nextRight.setRotation(Quaternionf.fromAngleDegAxis(-90, 0, 1, 0).mul(rotation));
    nextRight.randomize();
View Full Code Here

    nextFront.randomize();
    pieces.add(nextFront);
    final StructurePiece nextRight = getNextPiece();
    nextRight.setPosition(position.add(rotate(-4, 0, 3)));
    nextRight.setRotation(Quaternionf.fromAngleDegAxis(-90, 0, 1, 0).mul(rotation));
    nextRight.randomize();
    pieces.add(nextRight);
    final StructurePiece nextLeft = getNextPiece();
    nextLeft.setPosition(position.add(rotate(8, 0, 7)));
    nextLeft.setRotation(Quaternionf.fromAngleDegAxis(90, 0, 1, 0).mul(rotation));
    nextLeft.randomize();
View Full Code Here

    nextRight.randomize();
    pieces.add(nextRight);
    final StructurePiece nextLeft = getNextPiece();
    nextLeft.setPosition(position.add(rotate(8, 0, 7)));
    nextLeft.setRotation(Quaternionf.fromAngleDegAxis(90, 0, 1, 0).mul(rotation));
    nextLeft.randomize();
    pieces.add(nextLeft);
    return pieces;
  }

  @Override
View Full Code Here

  @Override
  public List<StructurePiece> getNextPieces() {
    final StructurePiece piece = getNextPiece();
    piece.setPosition(position.add(rotate(0, -6, 5)));
    piece.setRotation(rotation);
    piece.randomize();
    return Lists.newArrayList(piece);
  }

  @Override
  public BoundingBox getBoundingBox() {
View Full Code Here

  @Override
  public List<StructurePiece> getNextPieces() {
    final StructurePiece piece = getNextPiece();
    piece.setPosition(position.add(rotate(0, 0, 7)));
    piece.setRotation(rotation);
    piece.randomize();
    return Lists.newArrayList(piece);
  }

  @Override
  public BoundingBox getBoundingBox() {
View Full Code Here

    final List<StructurePiece> pieces = new ArrayList<StructurePiece>();
    if (startOfStronghold) {
      final StructurePiece piece = new StrongholdPortalRoom(parent);
      piece.setPosition(position.add(rotate(4, 0, -1)));
      piece.setRotation(Quaternionf.fromAngleDegAxis(180, 0, 1, 0).mul(rotation));
      piece.randomize();
      pieces.add(piece);
    }
    final StructurePiece piece = getNextPiece();
    piece.setPosition(position.add(rotate(0, 0, length)));
    piece.setRotation(rotation);
View Full Code Here

      pieces.add(piece);
    }
    final StructurePiece piece = getNextPiece();
    piece.setPosition(position.add(rotate(0, 0, length)));
    piece.setRotation(rotation);
    piece.randomize();
    pieces.add(piece);
    return pieces;
  }

  @Override
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.