コード例 #1
0
ファイル: Buildings.cs プロジェクト: RavetcoFX/mace-minecraft
        private static void MakeSewerEntrance(BlockManager bm, int x, int z, int intPlotSize)
        {
            // path
            BlockShapes.MakeHollowLayers(x, x + 8, 63, 63, z, z + intPlotSize, (int)BlockType.DOUBLE_SLAB);
            // building
            BlockShapes.MakeHollowBox(x + 2, x + 6, 63, 67, z + 2, z + 6, (int)BlockType.STONE);
            // doorway
            BlockShapes.MakeSolidBox(x + 4, x + 4, 64, 65, z + 2, z + 2, (int)BlockType.AIR);
            // tunnel down
            BlockShapes.MakeSolidBox(x + 4, x + 4, 55, 63, z + 4, z + 4, (int)BlockType.AIR);
            // ladder back
            BlockShapes.MakeSolidBox(x + 4, x + 4, 52, 55, z + 5, z + 5, (int)BlockType.STONE);
            // ladder rungs
            BlockHelper.MakeLadder(x + 4, 52, 63, z + 4);
            // hatch
            bm.SetID(x + 4, 64, z + 4, (int)BlockType.TRAPDOOR);
            bm.SetData(x + 4, 64, z + 4, 2);
            // chest with torches
            bm.SetID(x + 5, 64, z + 5, (int)BlockType.CHEST);
            TileEntityChest tec = new TileEntityChest();

            tec.Items[0] = BlockHelper.MakeItem((int)BlockType.REDSTONE_TORCH_ON, 64);
            tec.Items[1] = BlockHelper.MakeItem((int)BlockType.TORCH, 32);
            bm.SetTileEntity(x + 5, 64, z + 5, tec);
            // sign
            BlockHelper.MakeSign(x + 4, 66, z + 1, "Sewers||Currently|empty!", (int)BlockType.STONE);
        }
コード例 #2
0
 public static void MakeGuardTowers(BlockManager bm, int intFarmSize, int intMapSize, bool booIncludeWalls)
 {
     // remove wall
     BlockShapes.MakeSolidBox(intFarmSize + 5, intFarmSize + 11, 64, 79,
                              intFarmSize + 5, intFarmSize + 11, (int)BlockType.AIR, 1);
     // add tower
     BlockShapes.MakeHollowBox(intFarmSize + 4, intFarmSize + 12, 63, 80,
                               intFarmSize + 4, intFarmSize + 12, (int)BlockType.STONE, 1);
     // divide into two rooms
     BlockShapes.MakeSolidBox(intFarmSize + 4, intFarmSize + 12, 59, 71,
                              intFarmSize + 4, intFarmSize + 12, (int)BlockType.STONE, 1);
     // add openings to the walls
     for (int y = 72; y <= 74; y++)
     {
         for (int x = intFarmSize + 7; x <= intFarmSize + 9; x++)
         {
             BlockShapes.MakeBlock(x, y, intFarmSize + 12, (int)BlockType.AIR, 2);
         }
     }
     // add blocks on top of the towers
     BlockShapes.MakeHollowLayers(intFarmSize + 4, intFarmSize + 12, 81, 81,
                                  intFarmSize + 4, intFarmSize + 12, (int)BlockType.STONE, 1);
     // alternating top blocks
     for (int x = intFarmSize + 4; x <= intFarmSize + 12; x += 2)
     {
         for (int z = intFarmSize + 4; z <= intFarmSize + 12; z += 2)
         {
             if (x == intFarmSize + 4 || x == intFarmSize + 12 || z == intFarmSize + 4 || z == intFarmSize + 12)
             {
                 BlockShapes.MakeBlock(x, 82, z, (int)BlockType.STONE, 1);
             }
         }
     }
     // add central columns
     BlockShapes.MakeSolidBox(intFarmSize + 8, intFarmSize + 8, 72, 81,
                              intFarmSize + 8, intFarmSize + 8, (int)BlockType.STONE, 1);
     BlockHelper.MakeLadder(intFarmSize + 7, 72, 81, intFarmSize + 8, 2);
     BlockHelper.MakeLadder(intFarmSize + 9, 72, 81, intFarmSize + 8, 2);
     // add cobwebs
     // todo: could probably use double-mirroring here
     BlockShapes.MakeBlock(intFarmSize + 5, 79, intFarmSize + 5, (int)BlockType.COBWEB, 1, 30);
     BlockShapes.MakeBlock(intFarmSize + 5, 79, intFarmSize + 11, (int)BlockType.COBWEB, 1, 30);
     BlockShapes.MakeBlock(intFarmSize + 11, 79, intFarmSize + 5, (int)BlockType.COBWEB, 1, 30);
     BlockShapes.MakeBlock(intFarmSize + 11, 79, intFarmSize + 11, (int)BlockType.COBWEB, 1, 30);
     // add chests
     MakeGuardChest(bm, intFarmSize + 11, 72, intFarmSize + 11);
     MakeGuardChest(bm, intMapSize - (intFarmSize + 11), 72, intFarmSize + 11);
     MakeGuardChest(bm, intFarmSize + 11, 72, intMapSize - (intFarmSize + 11));
     MakeGuardChest(bm, intMapSize - (intFarmSize + 11), 72, intMapSize - (intFarmSize + 11));
     // add archery slots
     BlockShapes.MakeSolidBox(intFarmSize + 4, intFarmSize + 4, 73, 76,
                              intFarmSize + 8, intFarmSize + 8, (int)BlockType.AIR, 2);
     BlockShapes.MakeSolidBox(intFarmSize + 4, intFarmSize + 4, 75, 75,
                              intFarmSize + 7, intFarmSize + 9, (int)BlockType.AIR, 2);
     if (!booIncludeWalls)
     {
         BlockHelper.MakeLadder(intFarmSize + 13, 64, 71, intFarmSize + 8, 2);
     }
 }
コード例 #3
0
 public static void MakeGuardTowers()
 {
     Console.WriteLine("Making guard towers");
     // remove wall
     BlockShapes.MakeSolidBox(intFarmSize + 5, intFarmSize + 11, 64, 79, intFarmSize + 5, intFarmSize + 11, (int)BlockType.AIR, 1);
     // add tower
     BlockShapes.MakeHollowBox(intFarmSize + 4, intFarmSize + 12, 63, 80, intFarmSize + 4, intFarmSize + 12, (int)BlockType.STONE, 1);
     // divide into two rooms
     BlockShapes.MakeSolidBox(intFarmSize + 4, intFarmSize + 12, 71, 71, intFarmSize + 4, intFarmSize + 12, (int)BlockType.STONE, 1);
     // add openings to the walls
     for (int y = 72; y <= 74; y++)
     {
         for (int x = intFarmSize + 7; x <= intFarmSize + 9; x++)
         {
             BlockShapes.MakeBlock(x, y, intFarmSize + 12, (int)BlockType.AIR, 2);
         }
     }
     // add blocks on top of the towers
     BlockShapes.MakeHollowLayers(intFarmSize + 4, intFarmSize + 12, 81, 81, intFarmSize + 4, intFarmSize + 12, (int)BlockType.STONE, 1);
     // alternating top blocks
     for (int x = intFarmSize + 4; x <= intFarmSize + 12; x += 2)
     {
         for (int z = intFarmSize + 4; z <= intFarmSize + 12; z += 2)
         {
             if (x == intFarmSize + 4 || x == intFarmSize + 12 || z == intFarmSize + 4 || z == intFarmSize + 12)
             {
                 BlockShapes.MakeBlock(x, 82, z, (int)BlockType.STONE, 1);
             }
         }
     }
     // add central columns
     BlockShapes.MakeSolidBox(intFarmSize + 8, intFarmSize + 8, 72, 81, intFarmSize + 8, intFarmSize + 8, (int)BlockType.STONE, 1);
     BlockShapes.MakeLadder(intFarmSize + 7, 72, 81, intFarmSize + 8, 0, 1);
     BlockShapes.MakeLadder(intFarmSize + 9, 72, 81, intFarmSize + 8, 0, 1);
     BlockShapes.MakeLadder(intFarmSize + 8, 72, 81, intFarmSize + 7, 0, 1);
     BlockShapes.MakeLadder(intFarmSize + 8, 72, 81, intFarmSize + 9, 0, 1);
     // add cobwebs
     BlockShapes.MakeBlock(intFarmSize + 5, 79, intFarmSize + 5, 30, 1, 30);
     BlockShapes.MakeBlock(intFarmSize + 5, 79, intFarmSize + 11, 30, 1, 30);
     BlockShapes.MakeBlock(intFarmSize + 11, 79, intFarmSize + 5, 30, 1, 30);
     BlockShapes.MakeBlock(intFarmSize + 11, 79, intFarmSize + 11, 30, 1, 30);
     // add chests
     MakeGuardChest(intFarmSize + 5, 72, intFarmSize + 5);
     MakeGuardChest(intMapSize - (intFarmSize + 5), 72, intFarmSize + 5);
     MakeGuardChest(intFarmSize + 5, 72, intMapSize - (intFarmSize + 5));
     MakeGuardChest(intMapSize - (intFarmSize + 5), 72, intMapSize - (intFarmSize + 5));
 }
コード例 #4
0
ファイル: Buildings.cs プロジェクト: RavetcoFX/mace-minecraft
 private static void MakeHouse(BlockManager bm, int x, int z)
 {
     BlockShapes.MakeHollowBox(x + 2, x + 10, 63, 67, z + 2, z + 10, (int)BlockType.WOOD_PLANK);
     for (int a = 0; a <= 4; a++)
     {
         BlockShapes.MakeSolidBox(x + 2, x + 10, 67 + a, 67 + a, z + 2 + a, z + 10 - a, (int)BlockType.WOOD);
     }
     BlockShapes.MakeSolidBox(x + 10, x + 10, 65, 65, z + 6, z + 8, (int)BlockType.GLASS);
     BlockShapes.MakeSolidBox(x + 2, x + 2, 65, 65, z + 4, z + 8, (int)BlockType.GLASS);
     BlockShapes.MakeSolidBox(x + 4, x + 8, 65, 65, z + 2, z + 2, (int)BlockType.GLASS);
     BlockShapes.MakeSolidBox(x + 4, x + 8, 65, 65, z + 10, z + 10, (int)BlockType.GLASS);
     bm.SetID(x + 10, 64, z + 4, (int)BlockType.WOOD_DOOR);
     bm.SetData(x + 10, 64, z + 4, 5);
     bm.SetID(x + 10, 65, z + 4, (int)BlockType.WOOD_DOOR);
     bm.SetData(x + 10, 65, z + 4, 13);
     BlockShapes.RotateBlocks(x + 2, x + 10, 63, 71, z + 2, z + 10);
 }
コード例 #5
0
        public static void MakeGuardTowers(BlockManager bm, int intFarmSize, int intMapSize,
                                           bool booIncludeWalls, string strOutsideLights, string strFireBeacons)
        {
            // remove wall
            BlockShapes.MakeSolidBox(intFarmSize + 5, intFarmSize + 11, 64, 79,
                                     intFarmSize + 5, intFarmSize + 11, (int)BlockType.AIR, 1);
            // add tower
            BlockShapes.MakeHollowBox(intFarmSize + 4, intFarmSize + 12, 63, 80,
                                      intFarmSize + 4, intFarmSize + 12, (int)BlockType.STONE, 1);
            // divide into two rooms
            BlockShapes.MakeSolidBox(intFarmSize + 4, intFarmSize + 12, 2, 72,
                                     intFarmSize + 4, intFarmSize + 12, (int)BlockType.STONE, 1);
            BlockShapes.MakeSolidBox(intFarmSize + 5, intFarmSize + 11, 64, 67,
                                     intFarmSize + 5, intFarmSize + 11, (int)BlockType.AIR, 1);
            switch (strOutsideLights)
            {
            case "Fire":
                for (int y = 72; y <= 79; y += 7)
                {
                    BlockShapes.MakeBlock(intFarmSize + 6, y, intFarmSize + 3, (int)BlockType.NETHERRACK, 2);
                    BlockShapes.MakeBlock(intFarmSize + 6, y + 1, intFarmSize + 3, (int)BlockType.FIRE, 2);
                    BlockShapes.MakeBlock(intFarmSize + 10, y, intFarmSize + 3, (int)BlockType.NETHERRACK, 2);
                    BlockShapes.MakeBlock(intFarmSize + 10, y + 1, intFarmSize + 3, (int)BlockType.FIRE, 2);
                }
                break;

            case "Torches":
                for (int y = 73; y <= 80; y += 7)
                {
                    BlockHelper.MakeTorch(intFarmSize + 6, y, intFarmSize + 3, (int)BlockType.STONE, 2);
                    BlockHelper.MakeTorch(intFarmSize + 10, y, intFarmSize + 3, (int)BlockType.STONE, 2);
                }
                break;
            }
            // add torches
            BlockHelper.MakeTorch(intFarmSize + 6, 79, intFarmSize + 13, (int)BlockType.STONE, 2);
            BlockHelper.MakeTorch(intFarmSize + 10, 79, intFarmSize + 13, (int)BlockType.STONE, 2);
            // add torches inside
            BlockHelper.MakeTorch(intFarmSize + 6, 77, intFarmSize + 11, (int)BlockType.STONE, 2);
            BlockHelper.MakeTorch(intFarmSize + 10, 77, intFarmSize + 11, (int)BlockType.STONE, 2);
            BlockHelper.MakeTorch(intFarmSize + 5, 77, intFarmSize + 6, (int)BlockType.STONE, 2);
            BlockHelper.MakeTorch(intFarmSize + 5, 77, intFarmSize + 10, (int)BlockType.STONE, 2);
            // add openings to the walls
            BlockShapes.MakeBlock(intFarmSize + 7, 73, intFarmSize + 12, (int)BlockType.AIR, 2);
            BlockShapes.MakeBlock(intFarmSize + 9, 73, intFarmSize + 12, (int)BlockType.AIR, 2);
            BlockShapes.MakeBlock(intFarmSize + 7, 74, intFarmSize + 12, (int)BlockType.AIR, 2);
            BlockShapes.MakeBlock(intFarmSize + 9, 74, intFarmSize + 12, (int)BlockType.AIR, 2);
            // add blocks on top of the towers
            BlockShapes.MakeHollowLayers(intFarmSize + 4, intFarmSize + 12, 81, 81,
                                         intFarmSize + 4, intFarmSize + 12, (int)BlockType.STONE, 1);
            // alternating top blocks
            for (int x = intFarmSize + 4; x <= intFarmSize + 12; x += 2)
            {
                for (int z = intFarmSize + 4; z <= intFarmSize + 12; z += 2)
                {
                    if (x == intFarmSize + 4 || x == intFarmSize + 12 || z == intFarmSize + 4 || z == intFarmSize + 12)
                    {
                        BlockShapes.MakeBlock(x, 82, z, (int)BlockType.STONE, 1);
                    }
                }
            }
            // add central columns
            BlockShapes.MakeSolidBox(intFarmSize + 8, intFarmSize + 8, 73, 82,
                                     intFarmSize + 8, intFarmSize + 8, (int)BlockType.STONE, 1);
            BlockHelper.MakeLadder(intFarmSize + 7, 73, 82, intFarmSize + 8, 2);
            BlockHelper.MakeLadder(intFarmSize + 9, 73, 82, intFarmSize + 8, 2);
            // add torches on the roof
            BlockShapes.MakeBlock(intFarmSize + 6, 81, intFarmSize + 6, (int)BlockType.TORCH, 1);
            BlockShapes.MakeBlock(intFarmSize + 6, 81, intFarmSize + 10, (int)BlockType.TORCH, 2);
            BlockShapes.MakeBlock(intFarmSize + 10, 81, intFarmSize + 10, (int)BlockType.TORCH, 1);
            // add cobwebs
            BlockShapes.MakeBlock(intFarmSize + 5, 79, intFarmSize + 5, (int)BlockType.COBWEB, 1, 30);
            BlockShapes.MakeBlock(intFarmSize + 5, 79, intFarmSize + 11, (int)BlockType.COBWEB, 1, 30);
            BlockShapes.MakeBlock(intFarmSize + 11, 79, intFarmSize + 5, (int)BlockType.COBWEB, 1, 30);
            BlockShapes.MakeBlock(intFarmSize + 11, 79, intFarmSize + 11, (int)BlockType.COBWEB, 1, 30);
            // add chests
            MakeGuardChest(bm, intFarmSize + 11, 73, intFarmSize + 11);
            MakeGuardChest(bm, intMapSize - (intFarmSize + 11), 73, intFarmSize + 11);
            MakeGuardChest(bm, intFarmSize + 11, 73, intMapSize - (intFarmSize + 11));
            MakeGuardChest(bm, intMapSize - (intFarmSize + 11), 73, intMapSize - (intFarmSize + 11));
            // add archery slots
            BlockShapes.MakeSolidBox(intFarmSize + 4, intFarmSize + 4, 74, 77,
                                     intFarmSize + 8, intFarmSize + 8, (int)BlockType.AIR, 2);
            BlockShapes.MakeSolidBox(intFarmSize + 4, intFarmSize + 4, 76, 76,
                                     intFarmSize + 7, intFarmSize + 9, (int)BlockType.AIR, 2);
            if (!booIncludeWalls)
            {
                BlockHelper.MakeLadder(intFarmSize + 13, 64, 72, intFarmSize + 8, 2);
            }
            // include beds
            BlockHelper.MakeBed(intFarmSize + 5, intFarmSize + 6, 64, intFarmSize + 8, intFarmSize + 8, 2);
            BlockHelper.MakeBed(intFarmSize + 5, intFarmSize + 6, 64, intFarmSize + 10, intFarmSize + 10, 2);
            BlockHelper.MakeBed(intFarmSize + 11, intFarmSize + 10, 64, intFarmSize + 8, intFarmSize + 8, 2);
            // make columns to orientate torches
            BlockShapes.MakeSolidBox(intFarmSize + 5, intFarmSize + 5, 64, 73, intFarmSize + 5, intFarmSize + 5, (int)BlockType.WOOD, 2);
            BlockShapes.MakeSolidBox(intFarmSize + 11, intFarmSize + 11, 64, 71, intFarmSize + 5, intFarmSize + 5, (int)BlockType.WOOD, 2);
            BlockShapes.MakeSolidBox(intFarmSize + 5, intFarmSize + 5, 64, 71, intFarmSize + 11, intFarmSize + 11, (int)BlockType.WOOD, 2);
            BlockShapes.MakeSolidBox(intFarmSize + 11, intFarmSize + 11, 64, 71, intFarmSize + 11, intFarmSize + 11, (int)BlockType.WOOD, 2);
            // add ladders
            BlockHelper.MakeLadder(intFarmSize + 5, 64, 73, intFarmSize + 6, 2, (int)BlockType.WOOD);
            // make torches
            BlockHelper.MakeTorch(intFarmSize + 10, 66, intFarmSize + 5, (int)BlockType.WOOD, 2);
            BlockHelper.MakeTorch(intFarmSize + 6, 66, intFarmSize + 11, (int)BlockType.WOOD, 2);
            BlockHelper.MakeTorch(intFarmSize + 10, 66, intFarmSize + 11, (int)BlockType.WOOD, 2);
            // make columns for real
            BlockShapes.MakeSolidBox(intFarmSize + 5, intFarmSize + 5, 64, 73, intFarmSize + 5, intFarmSize + 5, (int)BlockType.STONE, 2);
            BlockShapes.MakeSolidBox(intFarmSize + 11, intFarmSize + 11, 64, 71, intFarmSize + 5, intFarmSize + 5, (int)BlockType.STONE, 2);
            BlockShapes.MakeSolidBox(intFarmSize + 5, intFarmSize + 5, 64, 71, intFarmSize + 11, intFarmSize + 11, (int)BlockType.STONE, 2);
            BlockShapes.MakeSolidBox(intFarmSize + 11, intFarmSize + 11, 64, 71, intFarmSize + 11, intFarmSize + 11, (int)BlockType.STONE, 2);
            // make cobwebs
            BlockShapes.MakeBlock(intFarmSize + 11, 67, intFarmSize + 8, (int)BlockType.COBWEB, 2, 75);
            // make doors from the city to the guard tower
            BlockShapes.MakeBlock(intFarmSize + 11, 65, intFarmSize + 11, (int)BlockType.GOLD_BLOCK, 1);
            BlockShapes.MakeBlock(intFarmSize + 11, 64, intFarmSize + 11, (int)BlockType.GOLD_BLOCK, 1);
            BlockHelper.MakeDoor(intFarmSize + 11, 64, intFarmSize + 12, (int)BlockType.GOLD_BLOCK, true, 2);
            BlockShapes.MakeBlock(intFarmSize + 11, 65, intFarmSize + 11, (int)BlockType.AIR, 1);
            BlockShapes.MakeBlock(intFarmSize + 11, 64, intFarmSize + 11, (int)BlockType.AIR, 1);
            BlockShapes.MakeBlock(intFarmSize + 11, 64, intFarmSize + 11, (int)BlockType.STONE_PLATE, 1);
            BlockShapes.MakeBlock(intFarmSize + 11, 64, intFarmSize + 13, (int)BlockType.STONE_PLATE, 2);
            // make beacon
            if (strFireBeacons == "Yes")
            {
                BlockShapes.MakeSolidBox(intFarmSize + 8, intFarmSize + 8, 83, 84,
                                         intFarmSize + 8, intFarmSize + 8, (int)BlockType.STONE, 1);
                BlockShapes.MakeSolidBox(intFarmSize + 6, intFarmSize + 10, 85, 85, intFarmSize + 6, intFarmSize + 10, (int)BlockType.STONE, 1);
                BlockShapes.MakeSolidBox(intFarmSize + 6, intFarmSize + 10, 86, 86, intFarmSize + 6, intFarmSize + 10, (int)BlockType.NETHERRACK, 1);
                BlockShapes.MakeSolidBox(intFarmSize + 6, intFarmSize + 10, 87, 87, intFarmSize + 6, intFarmSize + 10, (int)BlockType.FIRE, 1);
            }
        }
コード例 #6
0
        public static void MakePlots(bool[,] booSewerEntrances)
        {
            Console.WriteLine("Making plots");
            int intPlots = 1 + (((intMapSize - (intFarmSize + 20)) - (intFarmSize + 18)) / intPlotSize);

            for (int x = intFarmSize + 18; x < intMapSize - (intFarmSize + 20); x += intPlotSize)
            {
                for (int z = intFarmSize + 18; z < intMapSize - (intFarmSize + 20); z += intPlotSize)
                {
                    if (booSewerEntrances[(x - (intFarmSize + 18)) / intPlotSize, (z - (intFarmSize + 18)) / intPlotSize])
                    {
                        BlockShapes.MakeHollowBox(x + (intPlotSize / 2) - 2, x + (intPlotSize / 2) + 2, 63, 67,
                                                  z + (intPlotSize / 2) - 2, z + (intPlotSize / 2) + 2,
                                                  (int)BlockType.STONE);
                        BlockShapes.MakeSolidBox(x + (intPlotSize / 2), x + (intPlotSize / 2), 64, 65,
                                                 z + (intPlotSize / 2) - 2, z + (intPlotSize / 2) - 2,
                                                 (int)BlockType.AIR);
                        BlockShapes.MakeSolidBox(x + (intPlotSize / 2), x + (intPlotSize / 2), 55, 63,
                                                 z + (intPlotSize / 2), z + (intPlotSize / 2),
                                                 (int)BlockType.AIR);
                        BlockShapes.MakeSolidBox(x + (intPlotSize / 2), x + (intPlotSize / 2), 52, 55,
                                                 z + (intPlotSize / 2) + 1, z + (intPlotSize / 2) + 1, (int)BlockType.STONE);
                        BlockShapes.MakeLadder(x + (intPlotSize / 2), 52, 63, z + (intPlotSize / 2), 2);
                        bm.SetID(x + (intPlotSize / 2), 64, z + (intPlotSize / 2), 96); // hatch
                        bm.SetData(x + (intPlotSize / 2), 64, z + (intPlotSize / 2), 2);
                        bm.SetID(x + (intPlotSize / 2) + 1, 64, z + (intPlotSize / 2) + 1, (int)BlockType.CHEST);
                        TileEntityChest tec = new TileEntityChest();
                        tec.Items[0] = MakeItem((int)BlockType.REDSTONE_TORCH_ON, 32);
                        tec.Items[1] = MakeItem((int)BlockType.TORCH, 8);
                        bm.SetTileEntity(x + (intPlotSize / 2) + 1, 64, z + (intPlotSize / 2) + 1, tec);
                        MakeSign(x + (intPlotSize / 2), 66, z + (intPlotSize / 2) - 3, "Sewers||Currently|empty!", (int)BlockType.STONE);
                    }
                    else
                    {
                        int intRandBuilding = rand.Next(100);
                        if (intRandBuilding >= 90)
                        {
                            BlockShapes.MakeHollowLayers(x + 3, x + 9, 63, 63, z + 3, z + 9, (int)BlockType.DOUBLE_SLAB);
                            for (int a = 0; a <= 3; a++)
                            {
                                bm.SetID(x + 6, 63, z + a, (int)BlockType.DOUBLE_SLAB);
                            }
                            int x1 = x + rand.Next(5, 7);
                            int z1 = z + rand.Next(5, 7);
                            BlockShapes.MakeSolidBox(x1, x1 + 1, 63, 63, z1, z1 + 1, (int)BlockType.STATIONARY_WATER);
                            int  intFail = 0, intTrees = 10;
                            bool blnValid = true;
                            do
                            {
                                x1 = x + 1 + rand.Next(0, intPlotSize - 2);
                                z1 = z + 1 + rand.Next(0, intPlotSize - 2);
                                if (bm.GetID(x1, 63, z1) != (int)BlockType.DOUBLE_SLAB &&
                                    bm.GetID(x1, 63, z1) != (int)BlockType.STATIONARY_WATER)
                                {
                                    blnValid = true;
                                    for (int a = x1 - 4; a <= x1 + 4 && blnValid; a++)
                                    {
                                        for (int b = z1 - 4; b <= z1 + 4 && blnValid; b++)
                                        {
                                            if (bm.GetID(a, 64, b) == (int)BlockType.SAPLING)
                                            {
                                                blnValid = false;
                                            }
                                        }
                                    }
                                    if (blnValid)
                                    {
                                        bm.SetID(x1, 64, z1, (int)BlockType.SAPLING);
                                        bm.SetData(x1, 64, z1, 15);
                                        intTrees--;
                                        intFail = 0;
                                    }
                                    else
                                    {
                                        intFail++;
                                    }
                                }
                            } while (intTrees > 0 && intFail < 200);
                            for (x1 = x + 1; x1 < x + intPlotSize - 1; x1++)
                            {
                                for (z1 = z + 1; z1 < z + intPlotSize - 1; z1++)
                                {
                                    if (bm.GetID(x1, 63, z1) != (int)BlockType.STATIONARY_WATER &&
                                        bm.GetID(x1, 64, z1) != (int)BlockType.SAPLING &&
                                        bm.GetID(x1, 63, z1) != (int)BlockType.DOUBLE_SLAB)
                                    {
                                        int intRand = rand.Next(100);
                                        if (intRand > 66)
                                        {
                                            bm.SetID(x1, 64, z1, (int)BlockType.YELLOW_FLOWER);
                                        }
                                        else if (intRand > 33)
                                        {
                                            bm.SetID(x1, 64, z1, (int)BlockType.RED_ROSE);
                                        }
                                    }
                                }
                            }
                        }
                        else
                        {
                            BlockShapes.MakeHollowBox(x + 2, x + 10, 63, 67, z + 2, z + 10, (int)BlockType.WOOD_PLANK);
                            for (int a = 0; a <= 4; a++)
                            {
                                BlockShapes.MakeSolidBox(x + 2, x + 10, 67 + a, 67 + a, z + 2 + a, z + 10 - a, (int)BlockType.WOOD);
                            }
                            BlockShapes.MakeSolidBox(x + 10, x + 10, 65, 65, z + 6, z + 8, (int)BlockType.GLASS);
                            BlockShapes.MakeSolidBox(x + 2, x + 2, 65, 65, z + 4, z + 8, (int)BlockType.GLASS);
                            BlockShapes.MakeSolidBox(x + 4, x + 8, 65, 65, z + 2, z + 2, (int)BlockType.GLASS);
                            BlockShapes.MakeSolidBox(x + 4, x + 8, 65, 65, z + 10, z + 10, (int)BlockType.GLASS);
                            bm.SetID(x + 10, 64, z + 4, (int)BlockType.WOOD_DOOR);
                            bm.SetData(x + 10, 64, z + 4, 5);
                            bm.SetID(x + 10, 65, z + 4, (int)BlockType.WOOD_DOOR);
                            bm.SetData(x + 10, 65, z + 4, 13);
                        }
                    }
                    BlockShapes.MakeHollowLayers(x, x + intPlotSize, 63, 63, z, z + intPlotSize, (int)BlockType.DOUBLE_SLAB);
                }
            }
        }
コード例 #7
0
        public static void MakeGuardTowers(BlockManager bm, frmMace frmLogForm)
        {
            // remove wall
            BlockShapes.MakeSolidBox(City.EdgeLength + 5, City.EdgeLength + 11, 64, 79,
                                     City.EdgeLength + 5, City.EdgeLength + 11, BlockInfo.Air.ID, 1);
            // add tower
            BlockShapes.MakeHollowBox(City.EdgeLength + 4, City.EdgeLength + 12, 63, 80,
                                      City.EdgeLength + 4, City.EdgeLength + 12, City.WallMaterialID, 1, City.WallMaterialData);
            // divide into two rooms
            BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 4, City.EdgeLength + 12, 2, 72,
                                             City.EdgeLength + 4, City.EdgeLength + 12,
                                             City.WallMaterialID, 1, City.WallMaterialData);
            BlockShapes.MakeSolidBox(City.EdgeLength + 5, City.EdgeLength + 11, 64, 67,
                                     City.EdgeLength + 5, City.EdgeLength + 11, BlockInfo.Air.ID, 1);

            switch (City.OutsideLightType)
            {
            case "Fire":
                BlockShapes.MakeBlock(City.EdgeLength + 5, 76, City.EdgeLength + 3, BlockInfo.Netherrack.ID, 2, 100, -1);
                BlockShapes.MakeBlock(City.EdgeLength + 5, 77, City.EdgeLength + 3, BlockInfo.Fire.ID, 2, 100, -1);
                BlockShapes.MakeBlock(City.EdgeLength + 11, 76, City.EdgeLength + 3, BlockInfo.Netherrack.ID, 2, 100, -1);
                BlockShapes.MakeBlock(City.EdgeLength + 11, 77, City.EdgeLength + 3, BlockInfo.Fire.ID, 2, 100, -1);
                break;

            case "Torches":
                for (int y = 73; y <= 80; y += 7)
                {
                    BlockHelper.MakeTorch(City.EdgeLength + 6, y, City.EdgeLength + 3, City.WallMaterialID, 2);
                    BlockHelper.MakeTorch(City.EdgeLength + 10, y, City.EdgeLength + 3, City.WallMaterialID, 2);
                }
                break;

            case "None":
            case "":
                break;

            default:
                Debug.Fail("Invalid switch result");
                break;
            }
            if (City.HasTorchesOnWalkways)
            {
                // add torches
                BlockHelper.MakeTorch(City.EdgeLength + 6, 79, City.EdgeLength + 13, City.WallMaterialID, 2);
                BlockHelper.MakeTorch(City.EdgeLength + 10, 79, City.EdgeLength + 13, City.WallMaterialID, 2);
                // add torches inside
                BlockHelper.MakeTorch(City.EdgeLength + 6, 77, City.EdgeLength + 11, City.WallMaterialID, 2);
                BlockHelper.MakeTorch(City.EdgeLength + 10, 77, City.EdgeLength + 11, City.WallMaterialID, 2);
                BlockHelper.MakeTorch(City.EdgeLength + 5, 77, City.EdgeLength + 6, City.WallMaterialID, 2);
                BlockHelper.MakeTorch(City.EdgeLength + 5, 77, City.EdgeLength + 10, City.WallMaterialID, 2);
            }
            // add openings to the walls
            BlockShapes.MakeBlock(City.EdgeLength + 7, 73, City.EdgeLength + 12, BlockInfo.Air.ID, 2, 100, -1);
            BlockShapes.MakeBlock(City.EdgeLength + 9, 73, City.EdgeLength + 12, BlockInfo.Air.ID, 2, 100, -1);
            BlockShapes.MakeBlock(City.EdgeLength + 7, 74, City.EdgeLength + 12, BlockInfo.Air.ID, 2, 100, -1);
            BlockShapes.MakeBlock(City.EdgeLength + 9, 74, City.EdgeLength + 12, BlockInfo.Air.ID, 2, 100, -1);
            // add blocks on top of the towers
            BlockShapes.MakeHollowLayers(City.EdgeLength + 4, City.EdgeLength + 12, 81, 81,
                                         City.EdgeLength + 4, City.EdgeLength + 12,
                                         City.WallMaterialID, 1, City.WallMaterialData);

            // alternating top blocks
            for (int x = City.EdgeLength + 4; x <= City.EdgeLength + 12; x += 2)
            {
                for (int z = City.EdgeLength + 4; z <= City.EdgeLength + 12; z += 2)
                {
                    if (x == City.EdgeLength + 4 ||
                        x == City.EdgeLength + 12 ||
                        z == City.EdgeLength + 4 ||
                        z == City.EdgeLength + 12)
                    {
                        BlockShapes.MakeBlock(x, 82, z, City.WallMaterialID, 1, 100, City.WallMaterialData);
                    }
                }
            }
            // add central columns
            BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 8, City.EdgeLength + 8, 73, 82,
                                             City.EdgeLength + 8, City.EdgeLength + 8, City.WallMaterialID, 1,
                                             City.WallMaterialData);
            BlockHelper.MakeLadder(City.EdgeLength + 7, 73, 82, City.EdgeLength + 8, 2, City.WallMaterialID);
            BlockHelper.MakeLadder(City.EdgeLength + 9, 73, 82, City.EdgeLength + 8, 2, City.WallMaterialID);
            // add torches on the roof
            if (City.HasTorchesOnWalkways)
            {
                BlockShapes.MakeBlock(City.EdgeLength + 6, 81, City.EdgeLength + 6, BlockInfo.Torch.ID, 1, 100, -1);
                BlockShapes.MakeBlock(City.EdgeLength + 6, 81, City.EdgeLength + 10, BlockInfo.Torch.ID, 2, 100, -1);
                BlockShapes.MakeBlock(City.EdgeLength + 10, 81, City.EdgeLength + 10, BlockInfo.Torch.ID, 1, 100, -1);
            }
            // add cobwebs
            BlockShapes.MakeBlock(City.EdgeLength + 5, 79, City.EdgeLength + 5, BlockInfo.Cobweb.ID, 1, 30, -1);
            BlockShapes.MakeBlock(City.EdgeLength + 5, 79, City.EdgeLength + 11, BlockInfo.Cobweb.ID, 1, 30, -1);
            BlockShapes.MakeBlock(City.EdgeLength + 11, 79, City.EdgeLength + 5, BlockInfo.Cobweb.ID, 1, 30, -1);
            BlockShapes.MakeBlock(City.EdgeLength + 11, 79, City.EdgeLength + 11, BlockInfo.Cobweb.ID, 1, 30, -1);

            // add chests
            MakeGuardChest(bm, City.EdgeLength + 11, 73, City.EdgeLength + 11);
            MakeGuardChest(bm, City.MapLength - (City.EdgeLength + 11), 73, City.EdgeLength + 11);
            MakeGuardChest(bm, City.EdgeLength + 11, 73, City.MapLength - (City.EdgeLength + 11));
            MakeGuardChest(bm, City.MapLength - (City.EdgeLength + 11), 73, City.MapLength - (City.EdgeLength + 11));

            // add archery slots
            BlockShapes.MakeSolidBox(City.EdgeLength + 4, City.EdgeLength + 4, 74, 77,
                                     City.EdgeLength + 8, City.EdgeLength + 8, BlockInfo.Air.ID, 2);
            BlockShapes.MakeSolidBox(City.EdgeLength + 4, City.EdgeLength + 4, 76, 76,
                                     City.EdgeLength + 7, City.EdgeLength + 9, BlockInfo.Air.ID, 2);
            if (!City.HasWalls)
            {
                BlockHelper.MakeLadder(City.EdgeLength + 13, 64, 72, City.EdgeLength + 8, 2, City.WallMaterialID);
            }
            // include beds
            BlockHelper.MakeBed(City.EdgeLength + 5, City.EdgeLength + 6, 64, City.EdgeLength + 8, City.EdgeLength + 8, 2);
            BlockHelper.MakeBed(City.EdgeLength + 5, City.EdgeLength + 6, 64, City.EdgeLength + 10, City.EdgeLength + 10, 2);
            BlockHelper.MakeBed(City.EdgeLength + 11, City.EdgeLength + 10, 64, City.EdgeLength + 8, City.EdgeLength + 8, 2);
            // make columns to orientate torches
            BlockShapes.MakeSolidBox(City.EdgeLength + 5, City.EdgeLength + 5, 64, 73,
                                     City.EdgeLength + 5, City.EdgeLength + 5, BlockInfo.Wood.ID, 2);
            BlockShapes.MakeSolidBox(City.EdgeLength + 11, City.EdgeLength + 11, 64, 71,
                                     City.EdgeLength + 5, City.EdgeLength + 5, BlockInfo.Wood.ID, 2);
            BlockShapes.MakeSolidBox(City.EdgeLength + 5, City.EdgeLength + 5, 64, 71,
                                     City.EdgeLength + 11, City.EdgeLength + 11, BlockInfo.Wood.ID, 2);
            BlockShapes.MakeSolidBox(City.EdgeLength + 11, City.EdgeLength + 11, 64, 71,
                                     City.EdgeLength + 11, City.EdgeLength + 11, BlockInfo.Wood.ID, 2);
            // add ladders
            BlockHelper.MakeLadder(City.EdgeLength + 5, 64, 73, City.EdgeLength + 6, 2, BlockInfo.Wood.ID);
            // make torches
            if (City.HasTorchesOnWalkways)
            {
                BlockHelper.MakeTorch(City.EdgeLength + 10, 66, City.EdgeLength + 5, BlockInfo.Wood.ID, 2);
                BlockHelper.MakeTorch(City.EdgeLength + 6, 66, City.EdgeLength + 11, BlockInfo.Wood.ID, 2);
                BlockHelper.MakeTorch(City.EdgeLength + 10, 66, City.EdgeLength + 11, BlockInfo.Wood.ID, 2);
            }
            // make columns for real
            BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 5, City.EdgeLength + 5, 64, 73, City.EdgeLength + 5,
                                             City.EdgeLength + 5, City.WallMaterialID, 2, City.WallMaterialData);
            BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 11, City.EdgeLength + 11, 64, 71, City.EdgeLength + 5,
                                             City.EdgeLength + 5, City.WallMaterialID, 2, City.WallMaterialData);
            BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 5, City.EdgeLength + 5, 64, 71, City.EdgeLength + 11,
                                             City.EdgeLength + 11, City.WallMaterialID, 2, City.WallMaterialData);
            BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 11, City.EdgeLength + 11, 64, 71, City.EdgeLength + 11,
                                             City.EdgeLength + 11, City.WallMaterialID, 2, City.WallMaterialData);
            // make cobwebs
            BlockShapes.MakeBlock(City.EdgeLength + 11, 67, City.EdgeLength + 8, BlockInfo.Cobweb.ID, 2, 75, -1);
            // make doors from the city to the guard tower
            BlockShapes.MakeBlock(City.EdgeLength + 11, 65, City.EdgeLength + 11, BlockInfo.GoldBlock.ID, 1, 100, -1);
            BlockShapes.MakeBlock(City.EdgeLength + 11, 64, City.EdgeLength + 11, BlockInfo.GoldBlock.ID, 1, 100, -1);
            BlockHelper.MakeDoor(City.EdgeLength + 11, 64, City.EdgeLength + 12, BlockInfo.GoldBlock.ID, true, 2);
            BlockShapes.MakeBlock(City.EdgeLength + 11, 65, City.EdgeLength + 11, BlockInfo.Air.ID, 1, 100, -1);
            BlockShapes.MakeBlock(City.EdgeLength + 11, 64, City.EdgeLength + 11, BlockInfo.Air.ID, 1, 100, -1);
            BlockShapes.MakeBlock(City.EdgeLength + 11, 64, City.EdgeLength + 11, BlockInfo.StonePlate.ID, 1, 100, -1);
            BlockShapes.MakeBlock(City.EdgeLength + 11, 64, City.EdgeLength + 13, BlockInfo.StonePlate.ID, 2, 100, -1);
            //BlockShapes.MakeBlock(City.intFarmSize + 13, 64, City.intFarmSize + 11, BlockInfo.Stone.ID_PLATE, 1, 100, -1);
            // add guard tower sign
            BlockHelper.MakeSign(City.EdgeLength + 12, 65, City.EdgeLength + 13, "~Guard Tower~~", City.WallMaterialID, 1);
            BlockHelper.MakeSign(City.EdgeLength + 8, 74, City.EdgeLength + 13, "~Guard Tower~~", City.WallMaterialID, 2);
            // make beacon
            frmLogForm.UpdateLog("Creating tower addition: " + City.TowersAdditionType, true, true);
            switch (City.TowersAdditionType)
            {
            case "Fire beacon":
                BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 8, City.EdgeLength + 8, 83, 84,
                                                 City.EdgeLength + 8, City.EdgeLength + 8,
                                                 City.WallMaterialID, 1, City.WallMaterialData);
                BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 6, City.EdgeLength + 10, 85, 85,
                                                 City.EdgeLength + 6, City.EdgeLength + 10,
                                                 City.WallMaterialID, 1, City.WallMaterialData);
                BlockShapes.MakeSolidBox(City.EdgeLength + 6, City.EdgeLength + 10, 86, 86,
                                         City.EdgeLength + 6, City.EdgeLength + 10, BlockInfo.Netherrack.ID, 1);
                BlockShapes.MakeSolidBox(City.EdgeLength + 6, City.EdgeLength + 10, 87, 87,
                                         City.EdgeLength + 6, City.EdgeLength + 10, BlockInfo.Fire.ID, 1);
                break;

            case "Flag":
                BlockShapes.MakeSolidBox(City.EdgeLength + 4, City.EdgeLength + 4, 83, 91,
                                         City.EdgeLength + 12, City.EdgeLength + 12, BlockInfo.Fence.ID, 2);
                BlockShapes.MakeBlock(City.EdgeLength + 4, 84, City.EdgeLength + 13, BlockInfo.Fence.ID, 2, 100, 0);
                BlockShapes.MakeBlock(City.EdgeLength + 4, 91, City.EdgeLength + 13, BlockInfo.Fence.ID, 2, 100, 0);
                int[] intColours = RNG.ShuffleArray(Enumerable.Range(0, 15).ToArray());
                // select a random flag file and turn it into an array
                string[] strFlagLines = File.ReadAllLines(RNG.RandomItemFromArray(Directory.GetFiles("Resources", "Flag_*.txt")));
                for (int x = 0; x < strFlagLines[0].Length; x++)
                {
                    for (int y = 0; y < strFlagLines.GetLength(0); y++)
                    {
                        int WoolColourID = Convert.ToInt32(strFlagLines[y].Substring(x, 1));
                        BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 4, City.EdgeLength + 4,
                                                         90 - y, 90 - y,
                                                         City.EdgeLength + 13 + x, City.EdgeLength + 13 + x,
                                                         BlockInfo.Wool.ID, 2, intColours[WoolColourID]);
                    }
                }
                break;
            }
        }
コード例 #8
0
        public static void MakeGuardTowers(BlockManager bm, int intFarmLength, int intMapLength, bool booIncludeWalls,
                                           string strOutsideLights, string strTowerAddition,
                                           bool booIncludeItemsInChests, int intWallMaterial)
        {
            // remove wall
            BlockShapes.MakeSolidBox(intFarmLength + 5, intFarmLength + 11, 64, 79,
                                     intFarmLength + 5, intFarmLength + 11, BlockType.AIR, 1);
            // add tower
            BlockShapes.MakeHollowBox(intFarmLength + 4, intFarmLength + 12, 63, 80,
                                      intFarmLength + 4, intFarmLength + 12, intWallMaterial, 1, -1);
            // divide into two rooms
            BlockShapes.MakeSolidBox(intFarmLength + 4, intFarmLength + 12, 2, 72,
                                     intFarmLength + 4, intFarmLength + 12, intWallMaterial, 1);
            BlockShapes.MakeSolidBox(intFarmLength + 5, intFarmLength + 11, 64, 67,
                                     intFarmLength + 5, intFarmLength + 11, BlockType.AIR, 1);
            switch (strOutsideLights)
            {
            case "Fire":
                BlockShapes.MakeBlock(intFarmLength + 5, 76, intFarmLength + 3, BlockType.NETHERRACK, 2, 100, -1);
                BlockShapes.MakeBlock(intFarmLength + 5, 77, intFarmLength + 3, BlockType.FIRE, 2, 100, -1);
                BlockShapes.MakeBlock(intFarmLength + 11, 76, intFarmLength + 3, BlockType.NETHERRACK, 2, 100, -1);
                BlockShapes.MakeBlock(intFarmLength + 11, 77, intFarmLength + 3, BlockType.FIRE, 2, 100, -1);
                break;

            case "Torches":
                for (int y = 73; y <= 80; y += 7)
                {
                    BlockHelper.MakeTorch(intFarmLength + 6, y, intFarmLength + 3, intWallMaterial, 2);
                    BlockHelper.MakeTorch(intFarmLength + 10, y, intFarmLength + 3, intWallMaterial, 2);
                }
                break;

            case "None":
                break;

            default:
                Debug.Fail("Invalid switch result");
                break;
            }
            // add torches
            BlockHelper.MakeTorch(intFarmLength + 6, 79, intFarmLength + 13, intWallMaterial, 2);
            BlockHelper.MakeTorch(intFarmLength + 10, 79, intFarmLength + 13, intWallMaterial, 2);
            // add torches inside
            BlockHelper.MakeTorch(intFarmLength + 6, 77, intFarmLength + 11, intWallMaterial, 2);
            BlockHelper.MakeTorch(intFarmLength + 10, 77, intFarmLength + 11, intWallMaterial, 2);
            BlockHelper.MakeTorch(intFarmLength + 5, 77, intFarmLength + 6, intWallMaterial, 2);
            BlockHelper.MakeTorch(intFarmLength + 5, 77, intFarmLength + 10, intWallMaterial, 2);
            // add openings to the walls
            BlockShapes.MakeBlock(intFarmLength + 7, 73, intFarmLength + 12, BlockType.AIR, 2, 100, -1);
            BlockShapes.MakeBlock(intFarmLength + 9, 73, intFarmLength + 12, BlockType.AIR, 2, 100, -1);
            BlockShapes.MakeBlock(intFarmLength + 7, 74, intFarmLength + 12, BlockType.AIR, 2, 100, -1);
            BlockShapes.MakeBlock(intFarmLength + 9, 74, intFarmLength + 12, BlockType.AIR, 2, 100, -1);
            // add blocks on top of the towers
            BlockShapes.MakeHollowLayers(intFarmLength + 4, intFarmLength + 12, 81, 81,
                                         intFarmLength + 4, intFarmLength + 12, intWallMaterial, 1, -1);
            // alternating top blocks
            for (int x = intFarmLength + 4; x <= intFarmLength + 12; x += 2)
            {
                for (int z = intFarmLength + 4; z <= intFarmLength + 12; z += 2)
                {
                    if (x == intFarmLength + 4 || x == intFarmLength + 12 || z == intFarmLength + 4 || z == intFarmLength + 12)
                    {
                        BlockShapes.MakeBlock(x, 82, z, intWallMaterial, 1, 100, -1);
                    }
                }
            }
            // add central columns
            BlockShapes.MakeSolidBox(intFarmLength + 8, intFarmLength + 8, 73, 82,
                                     intFarmLength + 8, intFarmLength + 8, intWallMaterial, 1);
            BlockHelper.MakeLadder(intFarmLength + 7, 73, 82, intFarmLength + 8, 2, intWallMaterial);
            BlockHelper.MakeLadder(intFarmLength + 9, 73, 82, intFarmLength + 8, 2, intWallMaterial);
            // add torches on the roof
            BlockShapes.MakeBlock(intFarmLength + 6, 81, intFarmLength + 6, BlockType.TORCH, 1, 100, -1);
            BlockShapes.MakeBlock(intFarmLength + 6, 81, intFarmLength + 10, BlockType.TORCH, 2, 100, -1);
            BlockShapes.MakeBlock(intFarmLength + 10, 81, intFarmLength + 10, BlockType.TORCH, 1, 100, -1);
            // add cobwebs
            BlockShapes.MakeBlock(intFarmLength + 5, 79, intFarmLength + 5, BlockType.COBWEB, 1, 30, -1);
            BlockShapes.MakeBlock(intFarmLength + 5, 79, intFarmLength + 11, BlockType.COBWEB, 1, 30, -1);
            BlockShapes.MakeBlock(intFarmLength + 11, 79, intFarmLength + 5, BlockType.COBWEB, 1, 30, -1);
            BlockShapes.MakeBlock(intFarmLength + 11, 79, intFarmLength + 11, BlockType.COBWEB, 1, 30, -1);
            // add chests
            MakeGuardChest(bm, intFarmLength + 11, 73, intFarmLength + 11, booIncludeItemsInChests);
            MakeGuardChest(bm, intMapLength - (intFarmLength + 11), 73, intFarmLength + 11, booIncludeItemsInChests);
            MakeGuardChest(bm, intFarmLength + 11, 73, intMapLength - (intFarmLength + 11), booIncludeItemsInChests);
            MakeGuardChest(bm, intMapLength - (intFarmLength + 11), 73, intMapLength - (intFarmLength + 11),
                           booIncludeItemsInChests);
            // add archery slots
            BlockShapes.MakeSolidBox(intFarmLength + 4, intFarmLength + 4, 74, 77,
                                     intFarmLength + 8, intFarmLength + 8, BlockType.AIR, 2);
            BlockShapes.MakeSolidBox(intFarmLength + 4, intFarmLength + 4, 76, 76,
                                     intFarmLength + 7, intFarmLength + 9, BlockType.AIR, 2);
            if (!booIncludeWalls)
            {
                BlockHelper.MakeLadder(intFarmLength + 13, 64, 72, intFarmLength + 8, 2, intWallMaterial);
            }
            // include beds
            BlockHelper.MakeBed(intFarmLength + 5, intFarmLength + 6, 64, intFarmLength + 8, intFarmLength + 8, 2);
            BlockHelper.MakeBed(intFarmLength + 5, intFarmLength + 6, 64, intFarmLength + 10, intFarmLength + 10, 2);
            BlockHelper.MakeBed(intFarmLength + 11, intFarmLength + 10, 64, intFarmLength + 8, intFarmLength + 8, 2);
            // make columns to orientate torches
            BlockShapes.MakeSolidBox(intFarmLength + 5, intFarmLength + 5, 64, 73, intFarmLength + 5, intFarmLength + 5,
                                     BlockType.WOOD, 2);
            BlockShapes.MakeSolidBox(intFarmLength + 11, intFarmLength + 11, 64, 71, intFarmLength + 5, intFarmLength + 5,
                                     BlockType.WOOD, 2);
            BlockShapes.MakeSolidBox(intFarmLength + 5, intFarmLength + 5, 64, 71, intFarmLength + 11, intFarmLength + 11,
                                     BlockType.WOOD, 2);
            BlockShapes.MakeSolidBox(intFarmLength + 11, intFarmLength + 11, 64, 71, intFarmLength + 11, intFarmLength + 11,
                                     BlockType.WOOD, 2);
            // add ladders
            BlockHelper.MakeLadder(intFarmLength + 5, 64, 73, intFarmLength + 6, 2, BlockType.WOOD);
            // make torches
            BlockHelper.MakeTorch(intFarmLength + 10, 66, intFarmLength + 5, BlockType.WOOD, 2);
            BlockHelper.MakeTorch(intFarmLength + 6, 66, intFarmLength + 11, BlockType.WOOD, 2);
            BlockHelper.MakeTorch(intFarmLength + 10, 66, intFarmLength + 11, BlockType.WOOD, 2);
            // make columns for real
            BlockShapes.MakeSolidBox(intFarmLength + 5, intFarmLength + 5, 64, 73, intFarmLength + 5, intFarmLength + 5,
                                     intWallMaterial, 2);
            BlockShapes.MakeSolidBox(intFarmLength + 11, intFarmLength + 11, 64, 71, intFarmLength + 5, intFarmLength + 5,
                                     intWallMaterial, 2);
            BlockShapes.MakeSolidBox(intFarmLength + 5, intFarmLength + 5, 64, 71, intFarmLength + 11, intFarmLength + 11,
                                     intWallMaterial, 2);
            BlockShapes.MakeSolidBox(intFarmLength + 11, intFarmLength + 11, 64, 71, intFarmLength + 11, intFarmLength + 11,
                                     intWallMaterial, 2);
            // make cobwebs
            BlockShapes.MakeBlock(intFarmLength + 11, 67, intFarmLength + 8, BlockType.COBWEB, 2, 75, -1);
            // make doors from the city to the guard tower
            BlockShapes.MakeBlock(intFarmLength + 11, 65, intFarmLength + 11, BlockType.GOLD_BLOCK, 1, 100, -1);
            BlockShapes.MakeBlock(intFarmLength + 11, 64, intFarmLength + 11, BlockType.GOLD_BLOCK, 1, 100, -1);
            BlockHelper.MakeDoor(intFarmLength + 11, 64, intFarmLength + 12, BlockType.GOLD_BLOCK, true, 2);
            BlockShapes.MakeBlock(intFarmLength + 11, 65, intFarmLength + 11, BlockType.AIR, 1, 100, -1);
            BlockShapes.MakeBlock(intFarmLength + 11, 64, intFarmLength + 11, BlockType.AIR, 1, 100, -1);
            BlockShapes.MakeBlock(intFarmLength + 11, 64, intFarmLength + 11, BlockType.STONE_PLATE, 1, 100, -1);
            BlockShapes.MakeBlock(intFarmLength + 11, 64, intFarmLength + 13, BlockType.STONE_PLATE, 2, 100, -1);
            //BlockShapes.MakeBlock(intFarmLength + 13, 64, intFarmLength + 11, BlockType.STONE_PLATE, 1, 100, -1);
            // add guard tower sign
            BlockHelper.MakeSign(intFarmLength + 12, 65, intFarmLength + 13, "~Guard Tower~~", intWallMaterial, 1);
            BlockHelper.MakeSign(intFarmLength + 8, 74, intFarmLength + 13, "~Guard Tower~~", intWallMaterial, 2);
            // make beacon
            switch (strTowerAddition)
            {
            case "Fire beacon":
                BlockShapes.MakeSolidBox(intFarmLength + 8, intFarmLength + 8, 83, 84,
                                         intFarmLength + 8, intFarmLength + 8, intWallMaterial, 1);
                BlockShapes.MakeSolidBox(intFarmLength + 6, intFarmLength + 10, 85, 85,
                                         intFarmLength + 6, intFarmLength + 10, intWallMaterial, 1);
                BlockShapes.MakeSolidBox(intFarmLength + 6, intFarmLength + 10, 86, 86,
                                         intFarmLength + 6, intFarmLength + 10, BlockType.NETHERRACK, 1);
                BlockShapes.MakeSolidBox(intFarmLength + 6, intFarmLength + 10, 87, 87,
                                         intFarmLength + 6, intFarmLength + 10, BlockType.FIRE, 1);
                break;

            case "Flag":
                BlockShapes.MakeSolidBox(intFarmLength + 4, intFarmLength + 4, 83, 91,
                                         intFarmLength + 12, intFarmLength + 12, BlockType.FENCE, 2);
                BlockShapes.MakeBlock(intFarmLength + 4, 84, intFarmLength + 13, BlockType.FENCE, 2, 100, 0);
                BlockShapes.MakeBlock(intFarmLength + 4, 91, intFarmLength + 13, BlockType.FENCE, 2, 100, 0);
                int[] intColours = Utils.ShuffleArray(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 });
                switch (RandomHelper.Next(7))
                {
                case 0:         //2vert
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90,
                                                     intFarmLength + 13, intFarmLength + 17, BlockType.WOOL, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90,
                                                     intFarmLength + 18, intFarmLength + 22, BlockType.WOOL, 2, intColours[1]);
                    break;

                case 1:         //3vert
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90,
                                                     intFarmLength + 13, intFarmLength + 15, BlockType.WOOL, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90,
                                                     intFarmLength + 16, intFarmLength + 18, BlockType.WOOL, 2, intColours[1]);
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90,
                                                     intFarmLength + 19, intFarmLength + 21, BlockType.WOOL, 2, intColours[2]);
                    break;

                case 2:         //4vert
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90,
                                                     intFarmLength + 13, intFarmLength + 14, BlockType.WOOL, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90,
                                                     intFarmLength + 15, intFarmLength + 16, BlockType.WOOL, 2, intColours[1]);
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90,
                                                     intFarmLength + 17, intFarmLength + 18, BlockType.WOOL, 2, intColours[2]);
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90,
                                                     intFarmLength + 19, intFarmLength + 20, BlockType.WOOL, 2, intColours[3]);
                    break;

                case 3:         //2horiz
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 87,
                                                     intFarmLength + 13, intFarmLength + 22, BlockType.WOOL, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 88, 90,
                                                     intFarmLength + 13, intFarmLength + 22, BlockType.WOOL, 2, intColours[1]);
                    break;

                case 4:         //3horiz
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 86,
                                                     intFarmLength + 13, intFarmLength + 22, BlockType.WOOL, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 87, 88,
                                                     intFarmLength + 13, intFarmLength + 22, BlockType.WOOL, 2, intColours[1]);
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 89, 90,
                                                     intFarmLength + 13, intFarmLength + 22, BlockType.WOOL, 2, intColours[2]);
                    break;

                case 5:         //quarters
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 87,
                                                     intFarmLength + 13, intFarmLength + 17, BlockType.WOOL, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 87,
                                                     intFarmLength + 18, intFarmLength + 22, BlockType.WOOL, 2, intColours[1]);
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 88, 90,
                                                     intFarmLength + 13, intFarmLength + 17, BlockType.WOOL, 2, intColours[2]);
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 88, 90,
                                                     intFarmLength + 18, intFarmLength + 22, BlockType.WOOL, 2, intColours[3]);
                    break;

                case 6:         //cross
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90,
                                                     intFarmLength + 13, intFarmLength + 22, BlockType.WOOL, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 87, 88,
                                                     intFarmLength + 13, intFarmLength + 22, BlockType.WOOL, 2, intColours[1]);
                    BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90,
                                                     intFarmLength + 17, intFarmLength + 18, BlockType.WOOL, 2, intColours[1]);
                    break;

                default:
                    Debug.Fail("Invalid switch result");
                    break;
                }
                break;
            }
        }
コード例 #9
0
        public static void MakeGuardTowers(BlockManager bm, frmMace frmLogForm)
        {
            // remove wall
            BlockShapes.MakeSolidBox(City.FarmLength + 5, City.FarmLength + 11, 64, 79,
                                     City.FarmLength + 5, City.FarmLength + 11, BlockInfo.Air.ID, 1);
            // add tower
            BlockShapes.MakeHollowBox(City.FarmLength + 4, City.FarmLength + 12, 63, 80,
                                      City.FarmLength + 4, City.FarmLength + 12, City.WallMaterialID, 1, City.WallMaterialData);
            // divide into two rooms
            BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 12, 2, 72,
                                             City.FarmLength + 4, City.FarmLength + 12,
                                             City.WallMaterialID, 1, City.WallMaterialData);
            BlockShapes.MakeSolidBox(City.FarmLength + 5, City.FarmLength + 11, 64, 67,
                                     City.FarmLength + 5, City.FarmLength + 11, BlockInfo.Air.ID, 1);

            switch (City.OutsideLightType)
            {
            case "Fire":
                BlockShapes.MakeBlock(City.FarmLength + 5, 76, City.FarmLength + 3, BlockInfo.Netherrack.ID, 2, 100, -1);
                BlockShapes.MakeBlock(City.FarmLength + 5, 77, City.FarmLength + 3, BlockInfo.Fire.ID, 2, 100, -1);
                BlockShapes.MakeBlock(City.FarmLength + 11, 76, City.FarmLength + 3, BlockInfo.Netherrack.ID, 2, 100, -1);
                BlockShapes.MakeBlock(City.FarmLength + 11, 77, City.FarmLength + 3, BlockInfo.Fire.ID, 2, 100, -1);
                break;

            case "Torches":
                for (int y = 73; y <= 80; y += 7)
                {
                    BlockHelper.MakeTorch(City.FarmLength + 6, y, City.FarmLength + 3, City.WallMaterialID, 2);
                    BlockHelper.MakeTorch(City.FarmLength + 10, y, City.FarmLength + 3, City.WallMaterialID, 2);
                }
                break;

            case "None":
                break;

            default:
                Debug.Fail("Invalid switch result");
                break;
            }
            // add torches
            BlockHelper.MakeTorch(City.FarmLength + 6, 79, City.FarmLength + 13, City.WallMaterialID, 2);
            BlockHelper.MakeTorch(City.FarmLength + 10, 79, City.FarmLength + 13, City.WallMaterialID, 2);
            // add torches inside
            BlockHelper.MakeTorch(City.FarmLength + 6, 77, City.FarmLength + 11, City.WallMaterialID, 2);
            BlockHelper.MakeTorch(City.FarmLength + 10, 77, City.FarmLength + 11, City.WallMaterialID, 2);
            BlockHelper.MakeTorch(City.FarmLength + 5, 77, City.FarmLength + 6, City.WallMaterialID, 2);
            BlockHelper.MakeTorch(City.FarmLength + 5, 77, City.FarmLength + 10, City.WallMaterialID, 2);
            // add openings to the walls
            BlockShapes.MakeBlock(City.FarmLength + 7, 73, City.FarmLength + 12, BlockInfo.Air.ID, 2, 100, -1);
            BlockShapes.MakeBlock(City.FarmLength + 9, 73, City.FarmLength + 12, BlockInfo.Air.ID, 2, 100, -1);
            BlockShapes.MakeBlock(City.FarmLength + 7, 74, City.FarmLength + 12, BlockInfo.Air.ID, 2, 100, -1);
            BlockShapes.MakeBlock(City.FarmLength + 9, 74, City.FarmLength + 12, BlockInfo.Air.ID, 2, 100, -1);
            // add blocks on top of the towers
            BlockShapes.MakeHollowLayers(City.FarmLength + 4, City.FarmLength + 12, 81, 81,
                                         City.FarmLength + 4, City.FarmLength + 12,
                                         City.WallMaterialID, 1, City.WallMaterialData);

            // alternating top blocks
            for (int x = City.FarmLength + 4; x <= City.FarmLength + 12; x += 2)
            {
                for (int z = City.FarmLength + 4; z <= City.FarmLength + 12; z += 2)
                {
                    if (x == City.FarmLength + 4 ||
                        x == City.FarmLength + 12 ||
                        z == City.FarmLength + 4 ||
                        z == City.FarmLength + 12)
                    {
                        BlockShapes.MakeBlock(x, 82, z, City.WallMaterialID, 1, 100, City.WallMaterialData);
                    }
                }
            }
            // add central columns
            BlockShapes.MakeSolidBoxWithData(City.FarmLength + 8, City.FarmLength + 8, 73, 82,
                                             City.FarmLength + 8, City.FarmLength + 8, City.WallMaterialID, 1,
                                             City.WallMaterialData);
            BlockHelper.MakeLadder(City.FarmLength + 7, 73, 82, City.FarmLength + 8, 2, City.WallMaterialID);
            BlockHelper.MakeLadder(City.FarmLength + 9, 73, 82, City.FarmLength + 8, 2, City.WallMaterialID);
            // add torches on the roof
            BlockShapes.MakeBlock(City.FarmLength + 6, 81, City.FarmLength + 6, BlockInfo.Torch.ID, 1, 100, -1);
            BlockShapes.MakeBlock(City.FarmLength + 6, 81, City.FarmLength + 10, BlockInfo.Torch.ID, 2, 100, -1);
            BlockShapes.MakeBlock(City.FarmLength + 10, 81, City.FarmLength + 10, BlockInfo.Torch.ID, 1, 100, -1);
            // add cobwebs
            BlockShapes.MakeBlock(City.FarmLength + 5, 79, City.FarmLength + 5, BlockInfo.Cobweb.ID, 1, 30, -1);
            BlockShapes.MakeBlock(City.FarmLength + 5, 79, City.FarmLength + 11, BlockInfo.Cobweb.ID, 1, 30, -1);
            BlockShapes.MakeBlock(City.FarmLength + 11, 79, City.FarmLength + 5, BlockInfo.Cobweb.ID, 1, 30, -1);
            BlockShapes.MakeBlock(City.FarmLength + 11, 79, City.FarmLength + 11, BlockInfo.Cobweb.ID, 1, 30, -1);

            // add chests
            MakeGuardChest(bm, City.FarmLength + 11, 73, City.FarmLength + 11);
            MakeGuardChest(bm, City.MapLength - (City.FarmLength + 11), 73, City.FarmLength + 11);
            MakeGuardChest(bm, City.FarmLength + 11, 73, City.MapLength - (City.FarmLength + 11));
            MakeGuardChest(bm, City.MapLength - (City.FarmLength + 11), 73, City.MapLength - (City.FarmLength + 11));

            // add archery slots
            BlockShapes.MakeSolidBox(City.FarmLength + 4, City.FarmLength + 4, 74, 77,
                                     City.FarmLength + 8, City.FarmLength + 8, BlockInfo.Air.ID, 2);
            BlockShapes.MakeSolidBox(City.FarmLength + 4, City.FarmLength + 4, 76, 76,
                                     City.FarmLength + 7, City.FarmLength + 9, BlockInfo.Air.ID, 2);
            if (!City.HasWalls)
            {
                BlockHelper.MakeLadder(City.FarmLength + 13, 64, 72, City.FarmLength + 8, 2, City.WallMaterialID);
            }
            // include beds
            BlockHelper.MakeBed(City.FarmLength + 5, City.FarmLength + 6, 64, City.FarmLength + 8, City.FarmLength + 8, 2);
            BlockHelper.MakeBed(City.FarmLength + 5, City.FarmLength + 6, 64, City.FarmLength + 10, City.FarmLength + 10, 2);
            BlockHelper.MakeBed(City.FarmLength + 11, City.FarmLength + 10, 64, City.FarmLength + 8, City.FarmLength + 8, 2);
            // make columns to orientate torches
            BlockShapes.MakeSolidBox(City.FarmLength + 5, City.FarmLength + 5, 64, 73,
                                     City.FarmLength + 5, City.FarmLength + 5, BlockInfo.Wood.ID, 2);
            BlockShapes.MakeSolidBox(City.FarmLength + 11, City.FarmLength + 11, 64, 71,
                                     City.FarmLength + 5, City.FarmLength + 5, BlockInfo.Wood.ID, 2);
            BlockShapes.MakeSolidBox(City.FarmLength + 5, City.FarmLength + 5, 64, 71,
                                     City.FarmLength + 11, City.FarmLength + 11, BlockInfo.Wood.ID, 2);
            BlockShapes.MakeSolidBox(City.FarmLength + 11, City.FarmLength + 11, 64, 71,
                                     City.FarmLength + 11, City.FarmLength + 11, BlockInfo.Wood.ID, 2);
            // add ladders
            BlockHelper.MakeLadder(City.FarmLength + 5, 64, 73, City.FarmLength + 6, 2, BlockInfo.Wood.ID);
            // make torches
            BlockHelper.MakeTorch(City.FarmLength + 10, 66, City.FarmLength + 5, BlockInfo.Wood.ID, 2);
            BlockHelper.MakeTorch(City.FarmLength + 6, 66, City.FarmLength + 11, BlockInfo.Wood.ID, 2);
            BlockHelper.MakeTorch(City.FarmLength + 10, 66, City.FarmLength + 11, BlockInfo.Wood.ID, 2);
            // make columns for real
            BlockShapes.MakeSolidBoxWithData(City.FarmLength + 5, City.FarmLength + 5, 64, 73, City.FarmLength + 5,
                                             City.FarmLength + 5, City.WallMaterialID, 2, City.WallMaterialData);
            BlockShapes.MakeSolidBoxWithData(City.FarmLength + 11, City.FarmLength + 11, 64, 71, City.FarmLength + 5,
                                             City.FarmLength + 5, City.WallMaterialID, 2, City.WallMaterialData);
            BlockShapes.MakeSolidBoxWithData(City.FarmLength + 5, City.FarmLength + 5, 64, 71, City.FarmLength + 11,
                                             City.FarmLength + 11, City.WallMaterialID, 2, City.WallMaterialData);
            BlockShapes.MakeSolidBoxWithData(City.FarmLength + 11, City.FarmLength + 11, 64, 71, City.FarmLength + 11,
                                             City.FarmLength + 11, City.WallMaterialID, 2, City.WallMaterialData);
            // make cobwebs
            BlockShapes.MakeBlock(City.FarmLength + 11, 67, City.FarmLength + 8, BlockInfo.Cobweb.ID, 2, 75, -1);
            // make doors from the city to the guard tower
            BlockShapes.MakeBlock(City.FarmLength + 11, 65, City.FarmLength + 11, BlockInfo.GoldBlock.ID, 1, 100, -1);
            BlockShapes.MakeBlock(City.FarmLength + 11, 64, City.FarmLength + 11, BlockInfo.GoldBlock.ID, 1, 100, -1);
            BlockHelper.MakeDoor(City.FarmLength + 11, 64, City.FarmLength + 12, BlockInfo.GoldBlock.ID, true, 2);
            BlockShapes.MakeBlock(City.FarmLength + 11, 65, City.FarmLength + 11, BlockInfo.Air.ID, 1, 100, -1);
            BlockShapes.MakeBlock(City.FarmLength + 11, 64, City.FarmLength + 11, BlockInfo.Air.ID, 1, 100, -1);
            BlockShapes.MakeBlock(City.FarmLength + 11, 64, City.FarmLength + 11, BlockInfo.StonePlate.ID, 1, 100, -1);
            BlockShapes.MakeBlock(City.FarmLength + 11, 64, City.FarmLength + 13, BlockInfo.StonePlate.ID, 2, 100, -1);
            //BlockShapes.MakeBlock(City.intFarmSize + 13, 64, City.intFarmSize + 11, BlockInfo.Stone.ID_PLATE, 1, 100, -1);
            // add guard tower sign
            BlockHelper.MakeSign(City.FarmLength + 12, 65, City.FarmLength + 13, "~Guard Tower~~", City.WallMaterialID, 1);
            BlockHelper.MakeSign(City.FarmLength + 8, 74, City.FarmLength + 13, "~Guard Tower~~", City.WallMaterialID, 2);
            // make beacon
            frmLogForm.UpdateLog("Creating tower addition: " + City.TowersAdditionType, true, true);
            switch (City.TowersAdditionType)
            {
            case "Fire beacon":
                BlockShapes.MakeSolidBoxWithData(City.FarmLength + 8, City.FarmLength + 8, 83, 84,
                                                 City.FarmLength + 8, City.FarmLength + 8,
                                                 City.WallMaterialID, 1, City.WallMaterialData);
                BlockShapes.MakeSolidBoxWithData(City.FarmLength + 6, City.FarmLength + 10, 85, 85,
                                                 City.FarmLength + 6, City.FarmLength + 10,
                                                 City.WallMaterialID, 1, City.WallMaterialData);
                BlockShapes.MakeSolidBox(City.FarmLength + 6, City.FarmLength + 10, 86, 86,
                                         City.FarmLength + 6, City.FarmLength + 10, BlockInfo.Netherrack.ID, 1);
                BlockShapes.MakeSolidBox(City.FarmLength + 6, City.FarmLength + 10, 87, 87,
                                         City.FarmLength + 6, City.FarmLength + 10, BlockInfo.Fire.ID, 1);
                break;

            case "Flag":
                BlockShapes.MakeSolidBox(City.FarmLength + 4, City.FarmLength + 4, 83, 91,
                                         City.FarmLength + 12, City.FarmLength + 12, BlockInfo.Fence.ID, 2);
                BlockShapes.MakeBlock(City.FarmLength + 4, 84, City.FarmLength + 13, BlockInfo.Fence.ID, 2, 100, 0);
                BlockShapes.MakeBlock(City.FarmLength + 4, 91, City.FarmLength + 13, BlockInfo.Fence.ID, 2, 100, 0);
                int[] intColours = RandomHelper.ShuffleArray(Enumerable.Range(0, 15).ToArray());
                switch (RandomHelper.Next(8))
                {
                case 0:         //2vert
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90,
                                                     City.FarmLength + 13, City.FarmLength + 17, BlockInfo.Wool.ID, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90,
                                                     City.FarmLength + 18, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[1]);
                    break;

                case 1:         //3vert
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90,
                                                     City.FarmLength + 13, City.FarmLength + 15, BlockInfo.Wool.ID, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90,
                                                     City.FarmLength + 16, City.FarmLength + 18, BlockInfo.Wool.ID, 2, intColours[1]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90,
                                                     City.FarmLength + 19, City.FarmLength + 21, BlockInfo.Wool.ID, 2, intColours[2]);
                    break;

                case 2:         //4vert
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90,
                                                     City.FarmLength + 13, City.FarmLength + 14, BlockInfo.Wool.ID, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90,
                                                     City.FarmLength + 15, City.FarmLength + 16, BlockInfo.Wool.ID, 2, intColours[1]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90,
                                                     City.FarmLength + 17, City.FarmLength + 18, BlockInfo.Wool.ID, 2, intColours[2]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90,
                                                     City.FarmLength + 19, City.FarmLength + 20, BlockInfo.Wool.ID, 2, intColours[3]);
                    break;

                case 3:         //2horiz
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 87,
                                                     City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 88, 90,
                                                     City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[1]);
                    break;

                case 4:         //3horiz
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 86,
                                                     City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 87, 88,
                                                     City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[1]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 89, 90,
                                                     City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[2]);
                    break;

                case 5:         //quarters
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 87,
                                                     City.FarmLength + 13, City.FarmLength + 17, BlockInfo.Wool.ID, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 87,
                                                     City.FarmLength + 18, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[1]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 88, 90,
                                                     City.FarmLength + 13, City.FarmLength + 17, BlockInfo.Wool.ID, 2, intColours[2]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 88, 90,
                                                     City.FarmLength + 18, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[3]);
                    break;

                case 6:         //cross
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90,
                                                     City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 87, 88,
                                                     City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[1]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90,
                                                     City.FarmLength + 17, City.FarmLength + 18, BlockInfo.Wool.ID, 2, intColours[1]);
                    break;

                default:         // inside "circle"
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90,
                                                     City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[0]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 86, 89,
                                                     City.FarmLength + 17, City.FarmLength + 18, BlockInfo.Wool.ID, 2, intColours[1]);
                    BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 87, 88,
                                                     City.FarmLength + 16, City.FarmLength + 19, BlockInfo.Wool.ID, 2, intColours[1]);
                    break;
                }
                break;
            }
        }