コード例 #1
0
ファイル: StrongholdTurn.java プロジェクト: joansmith/Vanilla
 @Override
 public void place() {
   // Building objects
   final PieceCuboidBuilder box = new PieceCuboidBuilder(this);
   // General shape
   box.setPicker(new StrongholdBlockMaterialPicker(getRandom()));
   box.setMinMax(0, 0, 0, 4, 4, 4).toggleIgnoreAir().fill();
   box.toggleIgnoreAir();
   // Place the door
   StrongholdDoor.getRandomDoor(this, getRandom()).place(1, 1, 0);
   // Place the access way depending on the direction
   box.setPicker(new SimpleBlockMaterialPicker());
   if (left) {
     box.setMinMax(4, 1, 1, 4, 3, 3).fill();
   } else {
     box.setMinMax(0, 1, 1, 0, 3, 3).fill();
   }
 }
コード例 #2
0
ファイル: StrongholdTurn.java プロジェクト: Tomlabete/Vanilla
 @Override
 public void place() {
   // Building objects
   final ComponentCuboidPart box = new ComponentCuboidPart(this);
   // General shape
   box.setPicker(new StrongholdBlockMaterialPicker(getRandom()));
   box.setMinMax(0, 0, 0, 4, 4, 4);
   box.fill(true);
   // Place the door
   StrongholdDoor.getRandomDoor(this, getRandom()).place(1, 1, 0);
   // Place the access way depending on the direction
   box.setPicker(new SimpleBlockMaterialPicker());
   if (left) {
     box.setMinMax(4, 1, 1, 4, 3, 3);
     box.fill(false);
   } else {
     box.setMinMax(0, 1, 1, 0, 3, 3);
     box.fill(false);
   }
 }
コード例 #3
0
 @Override
 public void place() {
   // Building objects
   final ComponentCuboidPart box = new ComponentCuboidPart(this);
   final SimpleBlockMaterialPicker picker = new SimpleBlockMaterialPicker();
   final StrongholdBlockMaterialPicker stone = new StrongholdBlockMaterialPicker(getRandom());
   // General shape
   box.setPicker(stone);
   box.setMinMax(0, 0, 0, 8, 4, 10);
   box.fill(true);
   // Place the door
   StrongholdDoor.getRandomDoor(this, getRandom()).place(1, 1, 0);
   //
   box.setPicker(picker);
   box.setMinMax(1, 1, 10, 3, 3, 10);
   box.fill(false);
   //
   box.setPicker(stone);
   box.setMinMax(4, 1, 1, 4, 3, 1);
   box.fill(false);
   box.offsetMinMax(0, 0, 2, 0, 0, 2);
   box.fill(false);
   box.offsetMinMax(0, 0, 4, 0, 0, 4);
   box.fill(false);
   box.offsetMinMax(0, 0, 2, 0, 0, 2);
   box.fill(false);
   // Build the cells
   box.setPicker(picker);
   picker.setOuterInnerMaterials(VanillaMaterials.IRON_BARS, VanillaMaterials.IRON_BARS);
   box.setMinMax(4, 1, 4, 4, 3, 6);
   box.fill(false);
   box.setMinMax(5, 1, 5, 7, 3, 5);
   box.fill(false);
   setBlockMaterial(4, 3, 2, VanillaMaterials.IRON_BARS);
   setBlockMaterial(4, 3, 8, VanillaMaterials.IRON_BARS);
   // Add the cell doors
   setBlockMaterial(4, 1, 2, VanillaMaterials.IRON_DOOR_BLOCK, (short) 0);
   setBlockMaterial(4, 2, 2, VanillaMaterials.IRON_DOOR_BLOCK, (short) 8);
   setBlockMaterial(4, 1, 8, VanillaMaterials.IRON_DOOR_BLOCK, (short) 0);
   setBlockMaterial(4, 2, 8, VanillaMaterials.IRON_DOOR_BLOCK, (short) 8);
 }