Examples of PieceCuboidBuilder


Examples of org.spout.vanilla.world.generator.structure.PieceCuboidBuilder

    super(parent, DEFAULT_NEXT);
  }

  @Override
  public boolean canPlace() {
    final PieceCuboidBuilder box = new PieceCuboidBuilder(this);
    box.setMinMax(-1, -7, -1, 5, 5, 8);
    return !box.intersectsLiquids();
  }
View Full Code Here

Examples of org.spout.vanilla.world.generator.structure.PieceCuboidBuilder

  }

  @Override
  public void place() {
    // General shape
    final PieceCuboidBuilder box = new PieceCuboidBuilder(this);
    box.setPicker(new StrongholdBlockMaterialPicker(getRandom()));
    box.setMinMax(0, -6, 0, 4, 4, 7).toggleIgnoreAir().fill();
    box.toggleIgnoreAir();
    // Place the doors
    StrongholdDoor.getRandomDoor(this, getRandom()).place(1, 1, 0);
    new EmptyDoorway(this).place(1, -5, 7);
    // Place the steps
    for (int i = 0; i < 6; i++) {
View Full Code Here

Examples of org.spout.vanilla.world.generator.structure.PieceCuboidBuilder

        .addMaterial(VanillaMaterials.IRON_PICKAXE, 1, 1, 1);
  }

  @Override
  public boolean canPlace() {
    final PieceCuboidBuilder box = new PieceCuboidBuilder(this);
    box.setMinMax(-4, -1, -1, 8, 7, 11);
    return !box.intersectsLiquids();
  }
View Full Code Here

Examples of org.spout.vanilla.world.generator.structure.PieceCuboidBuilder

  }

  @Override
  public void place() {
    // General shape
    final PieceCuboidBuilder box = new PieceCuboidBuilder(this);
    box.setPicker(new StrongholdBlockMaterialPicker(getRandom()));
    box.setMinMax(-3, 0, 0, 7, 6, 10).toggleIgnoreAir().fill();
    box.toggleIgnoreAir();
    // Place the door
    StrongholdDoor.getRandomDoor(this, getRandom()).place(1, 1, 0);
    // More access ways
    box.setPicker(new SimpleBlockMaterialPicker());
    box.setMinMax(1, 1, 10, 3, 3, 10).fill();
    box.setMinMax(-3, 1, 4, -3, 3, 6).fill();
    box.offsetMinMax(10, 0, 0, 10, 0, 0).fill();
    // Add the features for the room type
    if (type == null) {
      return;
    }
    switch (type) {
View Full Code Here

Examples of org.spout.vanilla.world.generator.structure.PieceCuboidBuilder

    super(parent, DEFAULT_NEXT);
  }

  @Override
  public boolean canPlace() {
    final PieceCuboidBuilder box = new PieceCuboidBuilder(this);
    box.setMinMax(-1, -7, -1, 5, 5, 5);
    return !box.intersectsLiquids();
  }
View Full Code Here

Examples of org.spout.vanilla.world.generator.structure.PieceCuboidBuilder

  }

  @Override
  public void place() {
    // General shape
    final PieceCuboidBuilder box = new PieceCuboidBuilder(this);
    box.setPicker(new StrongholdBlockMaterialPicker(getRandom()));
    box.setMinMax(0, -6, 0, 4, 4, 4).toggleIgnoreAir().fill();
    box.toggleIgnoreAir();
    // Place the doors
    StrongholdDoor.getRandomDoor(this, getRandom()).place(1, 1, 0);
    new EmptyDoorway(this).place(1, -5, 4);
    // Place the steps
    setBlockMaterial(2, 0, 1, VanillaMaterials.STONE_BRICK);
View Full Code Here

Examples of org.spout.vanilla.world.generator.structure.PieceCuboidBuilder

  }

  @Override
  public void place() {
    // Building objects
    final PieceCuboidBuilder box = new PieceCuboidBuilder(this);
    final SimpleBlockMaterialPicker picker = new SimpleBlockMaterialPicker();
    final StrongholdBlockMaterialPicker stone = new StrongholdBlockMaterialPicker(getRandom());
    // General shape
    box.setPicker(stone);
    box.setMinMax(-3, 0, 0, 7, 7, 15).fill();
    // Place the door
    new IronFenceDoor(this).place(1, 1, 0);
    // Some stone for the side lava pools and ceiling
    box.setMinMax(-2, 6, 1, -2, 6, 14).fill();
    box.offsetMinMax(8, 0, 0, 8, 0, 0).fill();
    box.setMinMax(-2, 6, 1, 5, 6, 2).fill();
    box.offsetMinMax(0, 0, 13, 0, 0, 12).fill();
    box.setMinMax(-2, 1, 1, -1, 1, 4).fill();
    box.offsetMinMax(7, 0, 0, 7, 0, 0).fill();
    // Fill the side lava pools
    box.setPicker(picker);
    picker.setOuterInnerMaterials(VanillaMaterials.STATIONARY_LAVA, VanillaMaterials.STATIONARY_LAVA);
    box.setMinMax(-2, 1, 1, -2, 1, 3).fill();
    box.offsetMinMax(8, 0, 0, 8, 0, 0).fill();
    // Place the stone for the portal lava pool
    box.setPicker(stone);
    box.setMinMax(0, 1, 8, 4, 1, 12).fill();
    // Place the lava for the portal lava pool
    box.setPicker(picker);
    box.offsetMinMax(1, 0, 1, -1, 0, -1).fill();
    // Add iron bars to decorate the walls
    picker.setOuterInnerMaterials(VanillaMaterials.IRON_BARS, VanillaMaterials.IRON_BARS);
    for (int i = 3; i < 14; i += 2) {
      box.setMinMax(-3, 3, i, -3, 4, i).fill();
      box.offsetMinMax(10, 0, 0, 10, 0, 0).fill();
    }
    for (int i = -1; i < 6; i += 2) {
      box.setMinMax(i, 3, 15, i, 4, 15).fill();
    }
    // Some stone for the stairs
    box.setPicker(stone);
    box.setMinMax(1, 1, 5, 3, 1, 7).fill();
    box.offsetMinMax(0, 1, 1, 0, 1, 0).fill();
    box.offsetMinMax(0, 1, 1, 0, 1, 0).fill();
    // Place the stairs
    for (int i = 1; i <= 3; i++) {
      setBlockMaterial(i, 1, 4, VanillaMaterials.STAIRS_STONE_BRICK, (short) 2);
      setBlockMaterial(i, 2, 5, VanillaMaterials.STAIRS_STONE_BRICK, (short) 2);
      setBlockMaterial(i, 3, 6, VanillaMaterials.STAIRS_STONE_BRICK, (short) 2);
View Full Code Here

Examples of org.spout.vanilla.world.generator.structure.PieceCuboidBuilder

    super(parent, DEFAULT_NEXT);
  }

  @Override
  public boolean canPlace() {
    final PieceCuboidBuilder box = new PieceCuboidBuilder(this);
    box.setMinMax(-1, -1, -1, 5, 5, length + 1);
    return !box.intersectsLiquids();
  }
View Full Code Here

Examples of org.spout.vanilla.world.generator.structure.PieceCuboidBuilder

  }

  @Override
  public void place() {
    // Building objects
    final PieceCuboidBuilder box = new PieceCuboidBuilder(this);
    final SimpleBlockMaterialPicker picker = new SimpleBlockMaterialPicker();
    box.setPicker(picker);
    final Random random = getRandom();
    // Partially built higher part of the bridge
    picker.setOuterInnerMaterials(VanillaMaterials.NETHER_BRICK, VanillaMaterials.NETHER_BRICK);
    for (int xx = 0; xx <= 4; xx++) {
      for (int yy = 0; yy <= 1; yy++) {
        box.setMinMax(xx, yy, 0, xx, yy, random.nextInt(8)).fill();
      }
    }
    // Partially built side walls of the bridge
    box.setMinMax(0, 2, 0, 0, 2, random.nextInt(8)).fill();
    box.setMinMax(4, 2, 0, 4, 2, random.nextInt(8)).fill();
    // Partially built middle part of the bridge
    for (int xx = 0; xx <= 4; xx++) {
      box.setMinMax(xx, -1, 0, xx, -1, random.nextInt(5)).fill();
    }
    // Partially built lower part of the bridge
    for (int xx = 0; xx <= 4; xx++) {
      for (int yy = -3; yy <= -2; yy++) {
        box.setMinMax(xx, yy, 0, xx, yy, random.nextInt(3)).fill();
      }
    }
  }
View Full Code Here

Examples of org.spout.vanilla.world.generator.structure.PieceCuboidBuilder

    super(parent, DEFAULT_NEXT);
  }

  @Override
  public boolean canPlace() {
    final PieceCuboidBuilder box = new PieceCuboidBuilder(this);
    box.setMinMax(-4, -3, -1, 7, 7, 11);
    return !box.intersectsLiquids();
  }
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.