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

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


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


    pieces.add(piece);
    if (nextComponentRightLow) {
      final StructurePiece next = getNextPiece();
      next.setPosition(position.add(rotate(-4, 0, 0)));
      next.setRotation(Quaternionf.fromAngleDegAxis(-90, 0, 1, 0).mul(rotation));
      next.randomize();
      pieces.add(next);
    }
    if (nextComponentRightHigh) {
      final StructurePiece next = getNextPiece();
      next.setPosition(position.add(rotate(-4, 2, 6)));
View Full Code Here

    }
    if (nextComponentRightHigh) {
      final StructurePiece next = getNextPiece();
      next.setPosition(position.add(rotate(-4, 2, 6)));
      next.setRotation(Quaternionf.fromAngleDegAxis(-90, 0, 1, 0).mul(rotation));
      next.randomize();
      pieces.add(next);
    }
    if (nextComponentLeftLow) {
      final StructurePiece next = getNextPiece();
      next.setPosition(position.add(rotate(7, 0, 4)));
View Full Code Here

    }
    if (nextComponentLeftLow) {
      final StructurePiece next = getNextPiece();
      next.setPosition(position.add(rotate(7, 0, 4)));
      next.setRotation(Quaternionf.fromAngleDegAxis(90, 0, 1, 0).mul(rotation));
      next.randomize();
      pieces.add(next);
    }
    if (nextComponentLeftHigh) {
      final StructurePiece next = getNextPiece();
      next.setPosition(position.add(rotate(7, 2, 10)));
View Full Code Here

    }
    if (nextComponentLeftHigh) {
      final StructurePiece next = getNextPiece();
      next.setPosition(position.add(rotate(7, 2, 10)));
      next.setRotation(Quaternionf.fromAngleDegAxis(90, 0, 1, 0).mul(rotation));
      next.randomize();
      pieces.add(next);
    }
    return pieces;
  }
View Full Code Here

  @Override
  public List<StructurePiece> getNextPieces() {
    final StructurePiece piece = getNextPiece();
    piece.setPosition(position.add(rotate(6, 6, 5)));
    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, 11)));
    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 piece = getNextPiece();
    piece.setPosition(position.add(rotate(0, 0, 7)));
    piece.setRotation(rotation);
    piece.randomize();
    pieces.add(piece);
    if (nextComponentRight) {
      final StructurePiece next = getNextPiece();
      next.setPosition(position.add(rotate(-1, 0, 1)));
      next.setRotation(Quaternionf.fromAngleDegAxis(-90, 0, 1, 0).mul(rotation));
View Full Code Here

    pieces.add(piece);
    if (nextComponentRight) {
      final StructurePiece next = getNextPiece();
      next.setPosition(position.add(rotate(-1, 0, 1)));
      next.setRotation(Quaternionf.fromAngleDegAxis(-90, 0, 1, 0).mul(rotation));
      next.randomize();
      pieces.add(next);
    }
    if (nextComponentLeft) {
      final StructurePiece next = getNextPiece();
      next.setPosition(position.add(rotate(5, 0, 5)));
View Full Code Here

    }
    if (nextComponentLeft) {
      final StructurePiece next = getNextPiece();
      next.setPosition(position.add(rotate(5, 0, 5)));
      next.setRotation(Quaternionf.fromAngleDegAxis(90, 0, 1, 0).mul(rotation));
      next.randomize();
      pieces.add(next);
    }
    return pieces;
  }
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.