private void launcher(World world, Random rand, Cardinal dir, Coord pos) { Coord cursor = new Coord(pos); WorldGenPrimitive.setBlock(world, cursor, Blocks.redstone_wire); cursor.add(Cardinal.reverse(dir)); WorldGenPrimitive.setBlock(world, cursor, Blocks.redstone_wire); cursor.add(Cardinal.reverse(dir)); Repeater.generate(world, rand, dir, 0, cursor); cursor.add(Cardinal.reverse(dir)); cursor.add(Cardinal.UP); Dropper dropper = new Dropper(); dropper.generate(world, Cardinal.UP, cursor); for (int i = 0; i < 8; ++i) { dropper.add(world, cursor, i, new ItemStack(Items.dye, 1, i)); } dropper.add(world, cursor, 8, new ItemStack(Items.wooden_hoe)); cursor.add(Cardinal.UP); WorldGenPrimitive.setBlock(world, cursor, Blocks.hopper); cursor.add(dir); Comparator.generate(world, rand, dir, false, cursor); cursor.add(dir); WorldGenPrimitive.setBlock(world, cursor, Blocks.redstone_wire); cursor.add(dir); WorldGenPrimitive.setBlock(world, cursor, Blocks.redstone_wire); cursor.add(dir); Coord top = new Coord(pos.getX(), 80, pos.getZ()); while (top.getY() > pos.getY()) { top.add(Cardinal.DOWN); if (WorldGenPrimitive.getBlock(world, top).getBlock().getMaterial().isSolid()) break; } if (top.getY() >= 100) return; Coord start = new Coord(cursor); start.add(Cardinal.UP); start.add(dir); Coord end = new Coord(start); MetaBlock breadboard = new MetaBlock(Blocks.planks); boolean torch = false; while (end.getY() < top.getY()) { if (torch) { Torch.generate(world, Torch.REDSTONE, Cardinal.UP, cursor); } else { breadboard.setBlock(world, cursor); } torch = !torch; cursor.add(Cardinal.UP); end.add(Cardinal.UP); } if (torch) { cursor.add(Cardinal.DOWN); } Dispenser.generate(world, Cardinal.UP, cursor); for (int i = 0; i < 9; i++) { Dispenser.add(world, cursor, i, Firework.get(rand, 16 + rand.nextInt(16))); } cursor.add(Cardinal.UP); MetaBlock cob = new MetaBlock(Blocks.cobblestone); WorldGenPrimitive.fillRectSolid(world, rand, start, end, cob, true, true); start.add(Cardinal.reverse(dir), 2); end.add(Cardinal.reverse(dir), 2); WorldGenPrimitive.fillRectSolid(world, rand, start, end, cob, true, true); Cardinal[] orth = Cardinal.getOrthogonal(dir); start.add(dir); end.add(dir); Coord above = new Coord(end); above.add(Cardinal.UP, 10); List<Coord> tubeEnd = WorldGenPrimitive.getRectSolid(cursor, above); MetaBlock air = new MetaBlock(Blocks.air); for (Coord c : tubeEnd) { if (WorldGenPrimitive.getBlock(world, c).getBlock().getMaterial().isSolid()) { air.setBlock(world, c); } } start.add(orth[0]); end.add(orth[0]); WorldGenPrimitive.fillRectSolid(world, rand, start, end, cob, true, true); start.add(orth[1], 2); end.add(orth[1], 2); WorldGenPrimitive.fillRectSolid(world, rand, start, end, cob, true, true); }