zonmasgh

本教程实现在我的世界1.13版本任意存档函数生成52个最紧凑村庄刷铁塔(非红石堆叠),效率大于2100铁/小时,建议在沼泽、海洋等biome中生成。
使用java代码实现mc函数代码的生成,见教程末尾。

高空俯视图, 村庄一个52个,4层,每层13个,
采用数据分析筛选出距离中心村庄位置最近的12个村庄,然后向上递增64层堆叠

筛选算法根据村庄机制实现,保证1个村庄的21个门到另一个村庄中心距离大于64,且村民位于村庄中心方块区域内即可。
筛选出的村庄坐标如下,每行13个,y轴相对位置为0、-64、64、-128:
[0,0,0]        [-73,0,4]        [-40,0,-61]        [-33,0,65]        [33,0,-65]        [40,0,61]        [73,0,-4]        [-113,0,-58]        [-106,0,70]        [-7,0,-127]        [7,0,127]        [106,0,-70]        [113,0,58]       
[0,-64,0]        [-73,-64,4]        [-40,-64,-61]        [-33,-64,65]        [33,-64,-65]        [40,-64,61]        [73,-64,-4]        [-113,-64,-58]        [-106,-64,70]        [-7,-64,-127]        [7,-64,127]        [106,-64,-70]        [113,-64,58]       
[0,64,0]        [-73,64,4]        [-40,64,-61]        [-33,64,65]        [33,64,-65]        [40,64,61]        [73,64,-4]        [-113,64,-58]        [-106,64,70]        [-7,64,-127]        [7,64,127]        [106,64,-70]        [113,64,58]       
[0,128,0]        [-73,128,4]        [-40,128,-61]        [-33,128,65]        [33,128,-65]        [40,128,61]        [73,128,-4]        [-113,128,-58]        [-106,128,70]        [-7,128,-127]        [7,128,127]        [106,128,-70]        [113,128,58]



侧视图

底部物品传送

前3层生成的铁傀儡直接通过中间玻璃珠子坠落至最下层村庄的岩浆槽内

中心区域

村庄上层

村庄下层

生成傀儡

快速杀 死傀儡

一共13种村庄样式 以及13种玻璃颜色

传送铁块和花的装置

水道运送物品,代码使用了蓝冰加快物品运送速度

地下村庄防止岩浆的判断

村庄内部墙壁的生成,加入了水流、砂砾、岩浆、空气影响铁傀儡生成的判断
顶部判定还有海草、高海草、海带等,通过萤石替换

中心位置通过灵魂沙上水柱传送物品

收集装置,除物品展示框是手动加的,其余是指令生成的

存档Nbt验证

      将代码修改为自己的存档路径,以及要生成刷铁塔的位置,复制到java编辑器执行main即可生成函数 village.mcfunction。
在游戏中执行指令 /function datapack:village 即可生成,一共4000+条指令可能需要3至5分钟
  1. import java.io.File;
  2. import java.io.FileNotFoundException;
  3. import java.io.FileOutputStream;
  4. import java.io.PrintWriter;
  5. import java.util.ArrayList;
  6. import java.util.Arrays;
  7. import java.util.List;
  8. import java.util.Random;

  9. public class VillageSystem extends Village {
  10.     public static void main(String[] args) {
  11.         //游戏存档位置
  12.         String gameDir = "F:\\mc\\mc13\\saves\\test\";
  13.         //中间村庄西北上角方块位置
  14.         new VillageSystem(-9, 82, -9, gameDir).draw();
  15.     }

  16.     private List<Village> villages = new ArrayList<>();

  17.     private VillageSystem(int x, int y, int z, String gameDir) {
  18.         super(x, y, z);
  19.         try {
  20.             String dirPath = gameDir +
  21.                     "datapacks\\datapack\\data\\datapack\\functions\";
  22.             File folder = new File(dirPath);
  23.             if (!folder.exists()) {
  24.                 folder.mkdirs();
  25.                 File packFile = new File(gameDir + "datapacks\\datapack\\pack.mcmeta");
  26.                 if (!packFile.exists()) {
  27.                     pw = new PrintWriter(packFile);
  28.                     pw.print("{\n  "pack": {\n    "pack_format": 3,\n    "description": "Test"\n  }\n}");
  29.                     pw.flush();
  30.                     pw.close();
  31.                 }
  32.             }
  33.             this.pw = new PrintWriter(new FileOutputStream(new File(dirPath + "village.mcfunction")));
  34.         } catch (FileNotFoundException e) {
  35.             e.printStackTrace();
  36.         }
  37.         addVillage();
  38.     }

  39.     private void printGround() {
  40.         int groundY = y - 20;
  41.         println("fill ", x, " ", groundY, " ", z, " ", x + 17, " ", groundY, " ", z + 17, " grass_block replace");
  42.         println("setblock ", x + 1, " ", groundY, " ", z + 1, " glowstone replace");
  43.         println("setblock ", x + 1, " ", groundY, " ", z + 6, " glowstone replace");
  44.         println("setblock ", x + 1, " ", groundY, " ", z + 11, " glowstone replace");
  45.         println("setblock ", x + 1, " ", groundY, " ", z + 16, " glowstone replace");
  46.         println("setblock ", x + 6, " ", groundY, " ", z + 1, " glowstone replace");
  47.         println("setblock ", x + 6, " ", groundY, " ", z + 6, " glowstone replace");
  48.         println("setblock ", x + 6, " ", groundY, " ", z + 11, " glowstone replace");
  49.         println("setblock ", x + 6, " ", groundY, " ", z + 16, " glowstone replace");
  50.         println("setblock ", x + 11, " ", groundY, " ", z + 1, " glowstone replace");
  51.         println("setblock ", x + 11, " ", groundY, " ", z + 6, " glowstone replace");
  52.         println("setblock ", x + 11, " ", groundY, " ", z + 11, " glowstone replace");
  53.         println("setblock ", x + 11, " ", groundY, " ", z + 16, " glowstone replace");
  54.         println("setblock ", x + 16, " ", groundY, " ", z + 1, " glowstone replace");
  55.         println("setblock ", x + 16, " ", groundY, " ", z + 6, " glowstone replace");
  56.         println("setblock ", x + 16, " ", groundY, " ", z + 11, " glowstone replace");
  57.         println("setblock ", x + 16, " ", groundY, " ", z + 16, " glowstone replace");
  58.     }

  59.     private void addVillage() {
  60.         villages.add(new Village(x, y + 128, z, pw, 0));
  61.         villages.add(new Village(x - 73, y + 128, z + 4, pw, 1));
  62.         villages.add(new Village(x - 40, y + 128, z - 61, pw, 2));
  63.         villages.add(new Village(x - 33, y + 128, z + 65, pw, 3));
  64.         villages.add(new Village(x + 33, y + 128, z - 65, pw, 4));
  65.         villages.add(new Village(x + 40, y + 128, z + 61, pw, 5));
  66.         villages.add(new Village(x + 73, y + 128, z - 4, pw, 6));
  67.         villages.add(new Village(x - 113, y + 128, z - 58, pw, 7));
  68.         villages.add(new Village(x - 106, y + 128, z + 70, pw, 8));
  69.         villages.add(new Village(x - 7, y + 128, z - 127, pw, 9));
  70.         villages.add(new Village(x + 7, y + 128, z + 127, pw, 10));
  71.         villages.add(new Village(x + 106, y + 128, z - 70, pw, 11));
  72.         villages.add(new Village(x + 113, y + 128, z + 58, pw, 12));
  73.         villages.add(new Village(x, y + 64, z, pw, 0));
  74.         villages.add(new Village(x - 73, y + 64, z + 4, pw, 1));
  75.         villages.add(new Village(x - 40, y + 64, z - 61, pw, 2));
  76.         villages.add(new Village(x - 33, y + 64, z + 65, pw, 3));
  77.         villages.add(new Village(x + 33, y + 64, z - 65, pw, 4));
  78.         villages.add(new Village(x + 40, y + 64, z + 61, pw, 5));
  79.         villages.add(new Village(x + 73, y + 64, z - 4, pw, 6));
  80.         villages.add(new Village(x - 113, y + 64, z - 58, pw, 7));
  81.         villages.add(new Village(x - 106, y + 64, z + 70, pw, 8));
  82.         villages.add(new Village(x - 7, y + 64, z - 127, pw, 9));
  83.         villages.add(new Village(x + 7, y + 64, z + 127, pw, 10));
  84.         villages.add(new Village(x + 106, y + 64, z - 70, pw, 11));
  85.         villages.add(new Village(x + 113, y + 64, z + 58, pw, 12));
  86.         villages.add(new Village(x, y - 64, z, pw, 0));
  87.         villages.add(new Village(x - 73, y - 64, z + 4, pw, 1));
  88.         villages.add(new Village(x - 40, y - 64, z - 61, pw, 2));
  89.         villages.add(new Village(x - 33, y - 64, z + 65, pw, 3));
  90.         villages.add(new Village(x + 33, y - 64, z - 65, pw, 4));
  91.         villages.add(new Village(x + 40, y - 64, z + 61, pw, 5));
  92.         villages.add(new Village(x + 73, y - 64, z - 4, pw, 6));
  93.         villages.add(new Village(x - 113, y - 64, z - 58, pw, 7));
  94.         villages.add(new Village(x - 106, y - 64, z + 70, pw, 8));
  95.         villages.add(new Village(x - 7, y - 64, z - 127, pw, 9));
  96.         villages.add(new Village(x + 7, y - 64, z + 127, pw, 10));
  97.         villages.add(new Village(x + 106, y - 64, z - 70, pw, 11));
  98.         villages.add(new Village(x + 113, y - 64, z + 58, pw, 12));
  99.         villages.add(new Village(x, y, z, pw, 0));
  100.         villages.add(new Village(x - 73, y, z + 4, pw, 1));
  101.         villages.add(new Village(x - 40, y, z - 61, pw, 2));
  102.         villages.add(new Village(x - 33, y, z + 65, pw, 3));
  103.         villages.add(new Village(x + 33, y, z - 65, pw, 4));
  104.         villages.add(new Village(x + 40, y, z + 61, pw, 5));
  105.         villages.add(new Village(x + 73, y, z - 4, pw, 6));
  106.         villages.add(new Village(x - 113, y, z - 58, pw, 7));
  107.         villages.add(new Village(x - 106, y, z + 70, pw, 8));
  108.         villages.add(new Village(x - 7, y, z - 127, pw, 9));
  109.         villages.add(new Village(x + 7, y, z + 127, pw, 10));
  110.         villages.add(new Village(x + 106, y, z - 70, pw, 11));
  111.         villages.add(new Village(x + 113, y, z + 58, pw, 12));
  112.     }

  113.     public void draw() {
  114.         printGround();
  115.         villages.forEach(Village::draw);
  116.         drawGlass();
  117.         pw.flush();
  118.         pw.close();
  119.     }

  120.     private void drawGlass() {
  121.         //红色管道方块
  122.         println("fill ", x - 63, " ", y - 72, " ", z + 12, " ", x - 3, " ", y - 72, " ", z + 12, " blue_ice replace");
  123.         println("fill ", x - 63, " ", y - 71, " ", z + 12, " ", x - 3, " ", y - 71, " ", z + 12, " air replace");
  124.         println("fill ", x - 63, " ", y - 70, " ", z + 12, " ", x - 3, " ", y - 70, " ", z + 12, " red_stained_glass replace");
  125.         println("fill ", x - 62, " ", y - 71, " ", z + 13, " ", x - 3, " ", y - 71, " ", z + 13, " red_stained_glass replace");
  126.         println("fill ", x - 63, " ", y - 71, " ", z + 11, " ", x - 3, " ", y - 71, " ", z + 11, " red_stained_glass replace");
  127.         println("fill ", x - 3, " ", y - 71, " ", z + 6, " ", x - 3, " ", y - 71, " ", z + 10, " red_stained_glass replace");
  128.         println("fill ", x - 1, " ", y - 71, " ", z + 13, " ", x - 1, " ", y - 71, " ", z + 6, " red_stained_glass replace");
  129.         println("fill ", x - 2, " ", y - 70, " ", z + 13, " ", x - 2, " ", y - 70, " ", z + 8, " red_stained_glass replace");
  130. //蓝冰2管道方块
  131.         println("fill ", x - 97, " ", y - 72, " ", z + 77, " ", x - 97, " ", y - 72, " ", z + 67, " blue_ice replace");
  132.         println("fill ", x - 97, " ", y - 71, " ", z + 77, " ", x - 97, " ", y - 71, " ", z + 67, " air replace");
  133.         println("fill ", x - 96, " ", y - 71, " ", z + 77, " ", x - 96, " ", y - 71, " ", z + 68, " light_blue_stained_glass replace");
  134.         println("fill ", x - 98, " ", y - 71, " ", z + 77, " ", x - 98, " ", y - 71, " ", z + 66, " light_blue_stained_glass replace");
  135.         println("fill ", x - 97, " ", y - 72, " ", z + 66, " ", x + 120, " ", y - 72, " ", z + 66, " blue_ice replace");
  136.         println("fill ", x - 97, " ", y - 71, " ", z + 66, " ", x + 120, " ", y - 71, " ", z + 66, " air replace");
  137.         println("fill ", x - 97, " ", y - 70, " ", z + 77, " ", x - 97, " ", y - 70, " ", z + 66, " light_blue_stained_glass replace");
  138.         println("fill ", x - 98, " ", y - 71, " ", z + 65, " ", x - 26, " ", y - 71, " ", z + 65, " light_blue_stained_glass replace");
  139.         println("fill ", x - 96, " ", y - 71, " ", z + 67, " ", x - 26, " ", y - 71, " ", z + 67, " light_blue_stained_glass replace");
  140.         println("fill ", x - 96, " ", y - 70, " ", z + 66, " ", x - 26, " ", y - 70, " ", z + 66, " light_blue_stained_glass replace");
  141. //蓝冰3管道方块
  142.         println("fill ", x - 24, " ", y - 72, " ", z + 72, " ", x - 24, " ", y - 72, " ", z + 67, " blue_ice replace");
  143.         println("fill ", x - 24, " ", y - 71, " ", z + 72, " ", x - 24, " ", y - 71, " ", z + 67, " air replace");
  144.         println("fill ", x - 24, " ", y - 70, " ", z + 72, " ", x - 24, " ", y - 70, " ", z + 67, " orange_stained_glass replace");
  145.         println("fill ", x - 23, " ", y - 71, " ", z + 72, " ", x - 23, " ", y - 71, " ", z + 67, " orange_stained_glass replace");
  146.         println("fill ", x - 25, " ", y - 71, " ", z + 71, " ", x - 25, " ", y - 71, " ", z + 67, " orange_stained_glass replace");
  147.         println("fill ", x - 4, " ", y - 71, " ", z + 65, " ", x - 25, " ", y - 71, " ", z + 65, " orange_stained_glass replace");
  148.         println("fill ", x - 22, " ", y - 71, " ", z + 67, " ", x - 4, " ", y - 71, " ", z + 67, " orange_stained_glass replace");
  149.         println("fill ", x - 25, " ", y - 70, " ", z + 66, " ", x - 4, " ", y - 70, " ", z + 66, " orange_stained_glass replace");
  150.         println("fill ", x - 12, " ", y - 72, " ", z + 66, " ", x - 5, " ", y - 72, " ", z + 66, " orange_stained_glass replace");
  151.         println("fill ", x - 14, " ", y - 72, " ", z + 66, " ", x - 21, " ", y - 72, " ", z + 66, " orange_stained_glass replace");
  152. //浅绿色4管道方块
  153.         println("fill ", x - 3, " ", y - 71, " ", z + 67, " ", x + 14, " ", y - 71, " ", z + 67, " lime_stained_glass replace");
  154.         println("fill ", x, " ", y - 71, " ", z + 65, " ", x + 49, " ", y - 71, " ", z + 65, " lime_stained_glass replace");
  155.         println("fill ", x + 48, " ", y - 72, " ", z + 68, " ", x + 48, " ", y - 72, " ", z + 67, " blue_ice replace");
  156.         println("fill ", x + 48, " ", y - 71, " ", z + 68, " ", x + 48, " ", y - 71, " ", z + 67, " air replace");
  157.         println("fill ", x + 48, " ", y - 70, " ", z + 68, " ", x + 48, " ", y - 70, " ", z + 67, " lime_stained_glass replace");
  158.         println("setblock ", x + 49, " ", y - 71, " ", z + 67, " lime_stained_glass replace");
  159.         println("setblock ", x + 47, " ", y - 71, " ", z + 68, " lime_stained_glass replace");
  160.         println("fill ", x + 47, " ", y - 71, " ", z + 67, " ", x + 16, " ", y - 71, " ", z + 67, " lime_stained_glass replace");
  161.         println("fill ", x - 3, " ", y - 70, " ", z + 66, " ", x + 49, " ", y - 70, " ", z + 66, " lime_stained_glass replace");
  162.         println("fill ", x - 2, " ", y - 72, " ", z + 65, " ", x - 2, " ", y - 72, " ", z + 7, " blue_ice replace");
  163.         println("fill ", x - 2, " ", y - 71, " ", z + 65, " ", x - 2, " ", y - 71, " ", z + 7, " air replace");
  164.         println("fill ", x - 3, " ", y - 71, " ", z + 65, " ", x - 3, " ", y - 71, " ", z + 14, " lime_stained_glass replace");
  165.         println("fill ", x - 1, " ", y - 71, " ", z + 65, " ", x - 1, " ", y - 71, " ", z + 14, " lime_stained_glass replace");
  166.         println("setblock ", x + 47, " ", y - 71, " ", z + 68, " lime_stained_glass replace");
  167.         println("fill ", x - 2, " ", y - 70, " ", z + 14, " ", x - 2, " ", y - 70, " ", z + 65, " lime_stained_glass replace");
  168.         println("fill ", x + 9, " ", y - 72, " ", z + 66, " ", x + 2, " ", y - 72, " ", z + 66, " lime_stained_glass replace");
  169. //紫红色5管道方块
  170.         println("fill ", x + 15, " ", y - 72, " ", z + 134, " ", x + 15, " ", y - 72, " ", z + 67, " blue_ice replace");
  171.         println("fill ", x + 15, " ", y - 71, " ", z + 134, " ", x + 15, " ", y - 71, " ", z + 67, " air replace");
  172.         println("fill ", x + 15, " ", y - 70, " ", z + 134, " ", x + 15, " ", y - 70, " ", z + 67, " magenta_stained_glass replace");
  173.         println("fill ", x + 16, " ", y - 71, " ", z + 133, " ", x + 16, " ", y - 71, " ", z + 68, " magenta_stained_glass replace");
  174.         println("fill ", x + 14, " ", y - 71, " ", z + 134, " ", x + 14, " ", y - 71, " ", z + 68, " magenta_stained_glass replace");
  175. //白色6管道方块
  176.         println("fill ", x + 120, " ", y - 71, " ", z + 65, " ", x + 50, " ", y - 71, " ", z + 65, " white_stained_glass replace");
  177.         println("fill ", x + 119, " ", y - 71, " ", z + 67, " ", x + 50, " ", y - 71, " ", z + 67, " white_stained_glass replace");
  178. //绿色7管道方块
  179.         println("fill ", x + 81, " ", y - 72, " ", z + 6, " ", x - 1, " ", y - 72, " ", z + 6, " blue_ice replace");
  180.         println("fill ", x + 81, " ", y - 71, " ", z + 6, " ", x - 1, " ", y - 71, " ", z + 6, " air replace");
  181.         println("fill ", x + 81, " ", y - 70, " ", z + 6, " ", x + 10, " ", y - 70, " ", z + 6, " green_stained_glass replace");
  182.         println("fill ", x + 81, " ", y - 71, " ", z + 7, " ", x + 10, " ", y - 71, " ", z + 7, " green_stained_glass replace");
  183.         println("fill ", x + 79, " ", y - 71, " ", z + 5, " ", x + 10, " ", y - 71, " ", z + 5, " green_stained_glass replace");
  184. //青色8管道方块
  185.         println("fill ", x - 103, " ", y - 72, " ", z - 49, " ", x + 114, " ", y - 72, " ", z - 49, " blue_ice replace");
  186.         println("fill ", x - 103, " ", y - 71, " ", z - 49, " ", x + 114, " ", y - 71, " ", z - 49, " air replace");
  187.         println("fill ", x - 103, " ", y - 70, " ", z - 49, " ", x - 33, " ", y - 70, " ", z - 49, " cyan_stained_glass replace");
  188.         println("fill ", x - 103, " ", y - 71, " ", z - 48, " ", x - 33, " ", y - 71, " ", z - 48, " cyan_stained_glass replace");
  189.         println("fill ", x - 102, " ", y - 71, " ", z - 50, " ", x - 33, " ", y - 71, " ", z - 50, " cyan_stained_glass replace");
  190. //无色管道方块
  191.         println("setblock ", x + 8, " ", y - 72, " ", z + 7, " blue_ice replace");
  192.         println("setblock ", x + 8, " ", y - 71, " ", z + 7, " air replace");
  193.         println("fill ", x + 9, " ", y - 70, " ", z + 6, " ", x - 1, " ", y - 70, " ", z + 6, " glass replace");
  194.         println("fill ", x + 7, " ", y - 71, " ", z + 7, " ", x - 2, " ", y - 71, " ", z + 7, " glass replace");
  195.         println("fill ", x + 9, " ", y - 71, " ", z + 5, " ", x - 2, " ", y - 71, " ", z + 5, " glass replace");
  196. //分红9管道方块
  197.         println("fill ", x - 31, " ", y - 72, " ", z - 51, " ", x - 31, " ", y - 72, " ", z - 50, " blue_ice replace");
  198.         println("fill ", x - 31, " ", y - 71, " ", z - 51, " ", x - 31, " ", y - 71, " ", z - 50, " air replace");
  199.         println("setblock ", x - 31, " ", y - 70, " ", z - 50, " pink_stained_glass replace");
  200.         println("setblock ", x - 32, " ", y - 71, " ", z - 50, " pink_stained_glass replace");
  201.         println("setblock ", x - 30, " ", y - 71, " ", z - 51, " pink_stained_glass replace");
  202.         println("fill ", x - 32, " ", y - 71, " ", z - 48, " ", x - 1, " ", y - 71, " ", z - 48, " pink_stained_glass replace");
  203.         println("fill ", x - 30, " ", y - 71, " ", z - 50, " ", x + 2, " ", y - 71, " ", z - 50, " pink_stained_glass replace");
  204.         println("fill ", x + 1, " ", y - 70, " ", z - 50, " ", x + 1, " ", y - 70, " ", z + 5, " pink_stained_glass replace");
  205.         println("fill ", x + 1, " ", y - 72, " ", z - 48, " ", x + 1, " ", y - 72, " ", z + 5, " blue_ice replace");
  206.         println("fill ", x + 1, " ", y - 71, " ", z - 48, " ", x + 1, " ", y - 71, " ", z + 5, " air replace");
  207.         println("fill ", x, " ", y - 71, " ", z - 48, " ", x, " ", y - 72, " ", z + 5, " pink_stained_glass replace");
  208.         println("fill ", x + 2, " ", y - 71, " ", z - 48, " ", x + 2, " ", y - 72, " ", z + 5, " pink_stained_glass replace");
  209.         println("fill ", x - 32, " ", y - 70, " ", z - 49, " ", x, " ", y - 70, " ", z - 49, " pink_stained_glass replace");
  210.         println("fill ", x - 18, " ", y - 72, " ", z - 49, " ", x - 11, " ", y - 72, " ", z - 49, " pink_stained_glass replace");
  211.         println("fill ", x - 8, " ", y - 72, " ", z - 49, " ", x - 1, " ", y - 72, " ", z - 49, " pink_stained_glass replace");
  212. //蓝色10管道方块
  213.         println("fill ", x + 1, " ", y - 72, " ", z - 117, " ", x + 1, " ", y - 72, " ", z - 50, " blue_ice replace");
  214.         println("fill ", x + 1, " ", y - 71, " ", z - 117, " ", x + 1, " ", y - 71, " ", z - 50, " air replace");
  215.         println("fill ", x + 1, " ", y - 70, " ", z - 116, " ", x + 1, " ", y - 70, " ", z - 51, " blue_stained_glass replace");
  216.         println("fill ", x, " ", y - 71, " ", z - 117, " ", x, " ", y - 71, " ", z - 51, " blue_stained_glass replace");
  217.         println("fill ", x + 2, " ", y - 71, " ", z - 116, " ", x + 2, " ", y - 71, " ", z - 51, " blue_stained_glass replace");
  218. //黄色11管道方块
  219.         println("fill ", x + 3, " ", y - 71, " ", z - 48, " ", x + 42, " ", y - 71, " ", z - 48, " yellow_stained_glass replace");
  220.         println("fill ", x + 3, " ", y - 71, " ", z - 50, " ", x + 40, " ", y - 71, " ", z - 50, " yellow_stained_glass replace");
  221.         println("fill ", x + 3, " ", y - 70, " ", z - 49, " ", x + 42, " ", y - 70, " ", z - 49, " yellow_stained_glass replace");
  222.         println("fill ", x + 41, " ", y - 72, " ", z - 55, " ", x + 41, " ", y - 72, " ", z - 50, " blue_ice replace");
  223.         println("fill ", x + 41, " ", y - 71, " ", z - 55, " ", x + 41, " ", y - 71, " ", z - 50, " air replace");
  224.         println("fill ", x + 41, " ", y - 70, " ", z - 55, " ", x + 41, " ", y - 70, " ", z - 50, " yellow_stained_glass replace");
  225.         println("fill ", x + 40, " ", y - 71, " ", z - 55, " ", x + 40, " ", y - 71, " ", z - 51, " yellow_stained_glass replace");
  226.         println("fill ", x + 42, " ", y - 71, " ", z - 54, " ", x + 42, " ", y - 71, " ", z - 50, " yellow_stained_glass replace");
  227.         println("fill ", x + 10, " ", y - 72, " ", z - 49, " ", x + 3, " ", y - 72, " ", z - 49, " yellow_stained_glass replace");
  228.         println("fill ", x + 20, " ", y - 72, " ", z - 49, " ", x + 13, " ", y - 72, " ", z - 49, " yellow_stained_glass replace");
  229. //紫色12管道方块
  230.         println("fill ", x + 114, " ", y - 72, " ", z - 60, " ", x + 114, " ", y - 72, " ", z - 50, " blue_ice replace");
  231.         println("fill ", x + 114, " ", y - 71, " ", z - 60, " ", x + 114, " ", y - 71, " ", z - 50, " air replace");
  232.         println("fill ", x + 114, " ", y - 70, " ", z - 60, " ", x + 114, " ", y - 70, " ", z - 50, " purple_stained_glass replace");
  233.         println("fill ", x + 113, " ", y - 71, " ", z - 60, " ", x + 113, " ", y - 71, " ", z - 51, " purple_stained_glass replace");
  234.         println("fill ", x + 115, " ", y - 71, " ", z - 59, " ", x + 115, " ", y - 71, " ", z - 49, " purple_stained_glass replace");
  235.         println("fill ", x + 115, " ", y - 71, " ", z - 48, " ", x + 43, " ", y - 71, " ", z - 48, " purple_stained_glass replace");
  236.         println("fill ", x + 113, " ", y - 71, " ", z - 50, " ", x + 43, " ", y - 71, " ", z - 50, " purple_stained_glass replace");
  237.         println("fill ", x + 114, " ", y - 70, " ", z - 49, " ", x + 43, " ", y - 70, " ", z - 49, " purple_stained_glass replace");
  238. //1 红色管道传送
  239.         println("setblock ", x - 65, " ", y - 71, " ", z + 13, " water");
  240.         println("setblock ", x - 58, " ", y - 71, " ", z + 12, " iron_trapdoor[half=top]");
  241.         println("setblock ", x - 57, " ", y - 71, " ", z + 12, " water");
  242.         println("setblock ", x - 49, " ", y - 71, " ", z + 12, " iron_trapdoor[half=top]");
  243.         println("setblock ", x - 48, " ", y - 71, " ", z + 12, " water");
  244.         println("setblock ", x - 40, " ", y - 71, " ", z + 12, " iron_trapdoor[half=top]");
  245.         println("setblock ", x - 39, " ", y - 71, " ", z + 12, " water");
  246.         println("setblock ", x - 31, " ", y - 71, " ", z + 12, " iron_trapdoor[half=top]");
  247.         println("setblock ", x - 30, " ", y - 71, " ", z + 12, " water");
  248.         println("setblock ", x - 22, " ", y - 71, " ", z + 12, " iron_trapdoor[half=top]");
  249.         println("setblock ", x - 21, " ", y - 71, " ", z + 12, " water");
  250.         println("setblock ", x - 13, " ", y - 71, " ", z + 12, " iron_trapdoor[half=top]");
  251.         println("setblock ", x - 12, " ", y - 71, " ", z + 12, " water");
  252.         println("setblock ", x - 3, " ", y - 71, " ", z + 12, " iron_trapdoor[half=top]");
  253. //2 淡蓝色管道传送
  254.         println("setblock ", x - 98, " ", y - 71, " ", z + 79, " water");
  255.         println("setblock ", x - 97, " ", y - 71, " ", z + 72, " iron_trapdoor[half=top]");
  256.         println("setblock ", x - 97, " ", y - 71, " ", z + 71, " water");
  257.         println("setblock ", x - 94, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  258.         println("setblock ", x - 93, " ", y - 71, " ", z + 66, " water");
  259.         println("setblock ", x - 85, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  260.         println("setblock ", x - 84, " ", y - 71, " ", z + 66, " water");
  261.         println("setblock ", x - 76, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  262.         println("setblock ", x - 75, " ", y - 71, " ", z + 66, " water");
  263.         println("setblock ", x - 67, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  264.         println("setblock ", x - 66, " ", y - 71, " ", z + 66, " water");
  265.         println("setblock ", x - 58, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  266.         println("setblock ", x - 57, " ", y - 71, " ", z + 66, " water");
  267.         println("setblock ", x - 49, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  268.         println("setblock ", x - 48, " ", y - 71, " ", z + 66, " water");
  269.         println("setblock ", x - 40, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  270.         println("setblock ", x - 39, " ", y - 71, " ", z + 66, " water");
  271.         println("setblock ", x - 31, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  272.         println("setblock ", x - 30, " ", y - 71, " ", z + 66, " water");
  273.         println("setblock ", x - 24, " ", y - 71, " ", z + 67, " iron_trapdoor[half=top]");
  274.         println("setblock ", x - 25, " ", y - 71, " ", z + 74, " water");
  275.         println("setblock ", x - 22, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  276.         println("setblock ", x - 21, " ", y - 71, " ", z + 66, " water");
  277.         println("setblock ", x - 13, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  278.         println("setblock ", x - 12, " ", y - 71, " ", z + 66, " water");
  279. //白色管道传送
  280.         println("setblock ", x + 122, " ", y - 71, " ", z + 67, " water");
  281.         println("setblock ", x + 115, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  282.         println("setblock ", x + 114, " ", y - 71, " ", z + 66, " water");
  283.         println("setblock ", x + 106, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  284.         println("setblock ", x + 105, " ", y - 71, " ", z + 66, " water");
  285.         println("setblock ", x + 97, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  286.         println("setblock ", x + 96, " ", y - 71, " ", z + 66, " water");
  287.         println("setblock ", x + 88, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  288.         println("setblock ", x + 87, " ", y - 71, " ", z + 66, " water");
  289.         println("setblock ", x + 79, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  290.         println("setblock ", x + 78, " ", y - 71, " ", z + 66, " water");
  291.         println("setblock ", x + 70, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  292.         println("setblock ", x + 69, " ", y - 71, " ", z + 66, " water");
  293.         println("setblock ", x + 61, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  294.         println("setblock ", x + 60, " ", y - 71, " ", z + 66, " water");
  295. //粉红管道传送
  296.         println("setblock ", x + 16, " ", y - 71, " ", z + 136, " water");
  297.         println("setblock ", x + 15, " ", y - 71, " ", z + 129, " iron_trapdoor[half=top]");
  298.         println("setblock ", x + 15, " ", y - 71, " ", z + 128, " water");
  299.         println("setblock ", x + 15, " ", y - 71, " ", z + 120, " iron_trapdoor[half=top]");
  300.         println("setblock ", x + 15, " ", y - 71, " ", z + 119, " water");
  301.         println("setblock ", x + 15, " ", y - 71, " ", z + 111, " iron_trapdoor[half=top]");
  302.         println("setblock ", x + 15, " ", y - 71, " ", z + 110, " water");
  303.         println("setblock ", x + 15, " ", y - 71, " ", z + 102, " iron_trapdoor[half=top]");
  304.         println("setblock ", x + 15, " ", y - 71, " ", z + 101, " water");
  305.         println("setblock ", x + 15, " ", y - 71, " ", z + 93, " iron_trapdoor[half=top]");
  306.         println("setblock ", x + 15, " ", y - 71, " ", z + 92, " water");
  307.         println("setblock ", x + 15, " ", y - 71, " ", z + 84, " iron_trapdoor[half=top]");
  308.         println("setblock ", x + 15, " ", y - 71, " ", z + 83, " water");
  309.         println("setblock ", x + 15, " ", y - 71, " ", z + 75, " iron_trapdoor[half=top]");
  310.         println("setblock ", x + 15, " ", y - 71, " ", z + 74, " water");
  311.         println("setblock ", x + 15, " ", y - 71, " ", z + 67, " iron_trapdoor[half=top]");
  312. //浅绿管道传送
  313.         println("setblock ", x + 49, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  314.         println("setblock ", x + 49, " ", y - 71, " ", z + 70, " water");
  315.         println("setblock ", x + 45, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  316.         println("setblock ", x + 44, " ", y - 71, " ", z + 66, " water");
  317.         println("setblock ", x + 36, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  318.         println("setblock ", x + 35, " ", y - 71, " ", z + 66, " water");
  319.         println("setblock ", x + 28, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  320.         println("setblock ", x + 27, " ", y - 71, " ", z + 66, " water");
  321.         println("setblock ", x + 19, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  322.         println("setblock ", x + 18, " ", y - 71, " ", z + 66, " water");
  323.         println("setblock ", x + 10, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  324.         println("setblock ", x + 9, " ", y - 71, " ", z + 66, " water");
  325.         println("setblock ", x + 1, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  326.         println("setblock ", x, " ", y - 71, " ", z + 66, " water");
  327.         println("setblock ", x - 3, " ", y - 71, " ", z + 66, " iron_trapdoor[half=top]");
  328.         println("setblock ", x - 2, " ", y - 71, " ", z + 60, " iron_trapdoor[half=top]");
  329.         println("setblock ", x - 2, " ", y - 71, " ", z + 59, " water");
  330.         println("setblock ", x - 2, " ", y - 71, " ", z + 51, " iron_trapdoor[half=top]");
  331.         println("setblock ", x - 2, " ", y - 71, " ", z + 50, " water");
  332.         println("setblock ", x - 2, " ", y - 71, " ", z + 42, " iron_trapdoor[half=top]");
  333.         println("setblock ", x - 2, " ", y - 71, " ", z + 41, " water");
  334.         println("setblock ", x - 2, " ", y - 71, " ", z + 33, " iron_trapdoor[half=top]");
  335.         println("setblock ", x - 2, " ", y - 71, " ", z + 32, " water");
  336.         println("setblock ", x - 2, " ", y - 71, " ", z + 24, " iron_trapdoor[half=top]");
  337.         println("setblock ", x - 2, " ", y - 71, " ", z + 23, " water");
  338.         println("setblock ", x - 2, " ", y - 71, " ", z + 15, " iron_trapdoor[half=top]");
  339.         println("setblock ", x - 2, " ", y - 71, " ", z + 14, " water");
  340. //绿色管道传送
  341.         println("setblock ", x + 82, " ", y - 71, " ", z + 4, " water");
  342.         println("setblock ", x + 76, " ", y - 71, " ", z + 6, " iron_trapdoor[half=top]");
  343.         println("setblock ", x + 75, " ", y - 71, " ", z + 6, " water");
  344.         println("setblock ", x + 67, " ", y - 71, " ", z + 6, " iron_trapdoor[half=top]");
  345.         println("setblock ", x + 66, " ", y - 71, " ", z + 6, " water");
  346.         println("setblock ", x + 58, " ", y - 71, " ", z + 6, " iron_trapdoor[half=top]");
  347.         println("setblock ", x + 57, " ", y - 71, " ", z + 6, " water");
  348.         println("setblock ", x + 49, " ", y - 71, " ", z + 6, " iron_trapdoor[half=top]");
  349.         println("setblock ", x + 48, " ", y - 71, " ", z + 6, " water");
  350.         println("setblock ", x + 40, " ", y - 71, " ", z + 6, " iron_trapdoor[half=top]");
  351.         println("setblock ", x + 39, " ", y - 71, " ", z + 6, " water");
  352.         println("setblock ", x + 31, " ", y - 71, " ", z + 6, " iron_trapdoor[half=top]");
  353.         println("setblock ", x + 30, " ", y - 71, " ", z + 6, " water");
  354.         println("setblock ", x + 22, " ", y - 71, " ", z + 6, " iron_trapdoor[half=top]");
  355.         println("setblock ", x + 21, " ", y - 71, " ", z + 6, " water");
  356.         println("setblock ", x + 13, " ", y - 71, " ", z + 6, " iron_trapdoor[half=top]");
  357.         println("setblock ", x + 12, " ", y - 71, " ", z + 6, " water");
  358.         println("setblock ", x + 4, " ", y - 71, " ", z + 6, " iron_trapdoor[half=top]");
  359.         println("setblock ", x + 3, " ", y - 71, " ", z + 6, " water");
  360. //无色管道传送
  361.         println("setblock ", x + 8, " ", y - 71, " ", z + 7, " iron_trapdoor[half=top]");
  362.         println("setblock ", x + 9, " ", y - 71, " ", z + 9, " water");
  363. //青色管道传送
  364.         println("setblock ", x - 105, " ", y - 71, " ", z - 50, " water");
  365.         println("setblock ", x - 98, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  366.         println("setblock ", x - 97, " ", y - 71, " ", z - 49, " water");
  367.         println("setblock ", x - 89, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  368.         println("setblock ", x - 88, " ", y - 71, " ", z - 49, " water");
  369.         println("setblock ", x - 80, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  370.         println("setblock ", x - 79, " ", y - 71, " ", z - 49, " water");
  371.         println("setblock ", x - 71, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  372.         println("setblock ", x - 70, " ", y - 71, " ", z - 49, " water");
  373.         println("setblock ", x - 62, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  374.         println("setblock ", x - 61, " ", y - 71, " ", z - 49, " water");
  375.         println("setblock ", x - 53, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  376.         println("setblock ", x - 52, " ", y - 71, " ", z - 49, " water");
  377.         println("setblock ", x - 44, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  378.         println("setblock ", x - 43, " ", y - 71, " ", z - 49, " water");
  379.         println("setblock ", x - 32, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  380. //粉红色管道传送
  381.         println("setblock ", x - 32, " ", y - 71, " ", z - 53, " water");
  382.         println("setblock ", x - 28, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  383.         println("setblock ", x - 27, " ", y - 71, " ", z - 49, " water");
  384.         println("setblock ", x - 19, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  385.         println("setblock ", x - 18, " ", y - 71, " ", z - 49, " water");
  386.         println("setblock ", x - 9, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  387.         println("setblock ", x - 8, " ", y - 71, " ", z - 49, " water");
  388.         println("setblock ", x, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  389. //蓝色管道传送
  390.         println("setblock ", x + 2, " ", y - 71, " ", z - 119, " water");
  391.         println("setblock ", x + 1, " ", y - 71, " ", z - 112, " iron_trapdoor[half=top]");
  392.         println("setblock ", x + 1, " ", y - 71, " ", z - 111, " water");
  393.         println("setblock ", x + 1, " ", y - 71, " ", z - 103, " iron_trapdoor[half=top]");
  394.         println("setblock ", x + 1, " ", y - 71, " ", z - 102, " water");
  395.         println("setblock ", x + 1, " ", y - 71, " ", z - 94, " iron_trapdoor[half=top]");
  396.         println("setblock ", x + 1, " ", y - 71, " ", z - 93, " water");
  397.         println("setblock ", x + 1, " ", y - 71, " ", z - 85, " iron_trapdoor[half=top]");
  398.         println("setblock ", x + 1, " ", y - 71, " ", z - 84, " water");
  399.         println("setblock ", x + 1, " ", y - 71, " ", z - 76, " iron_trapdoor[half=top]");
  400.         println("setblock ", x + 1, " ", y - 71, " ", z - 75, " water");
  401.         println("setblock ", x + 1, " ", y - 71, " ", z - 67, " iron_trapdoor[half=top]");
  402.         println("setblock ", x + 1, " ", y - 71, " ", z - 66, " water");
  403.         println("setblock ", x + 1, " ", y - 71, " ", z - 58, " iron_trapdoor[half=top]");
  404.         println("setblock ", x + 1, " ", y - 71, " ", z - 57, " water");
  405.         println("setblock ", x + 1, " ", y - 71, " ", z - 51, " iron_trapdoor[half=top]");
  406.         println("setblock ", x + 1, " ", y - 71, " ", z - 50, " water");
  407.         println("setblock ", x + 1, " ", y - 71, " ", z - 42, " iron_trapdoor[half=top]");
  408.         println("setblock ", x + 1, " ", y - 71, " ", z - 41, " water");
  409.         println("setblock ", x + 1, " ", y - 71, " ", z - 33, " iron_trapdoor[half=top]");
  410.         println("setblock ", x + 1, " ", y - 71, " ", z - 32, " water");
  411.         println("setblock ", x + 1, " ", y - 71, " ", z - 24, " iron_trapdoor[half=top]");
  412.         println("setblock ", x + 1, " ", y - 71, " ", z - 23, " water");
  413.         println("setblock ", x + 1, " ", y - 71, " ", z - 15, " iron_trapdoor[half=top]");
  414.         println("setblock ", x + 1, " ", y - 71, " ", z - 14, " water");
  415.         println("setblock ", x + 1, " ", y - 71, " ", z - 6, " iron_trapdoor[half=top]");
  416.         println("setblock ", x + 1, " ", y - 71, " ", z - 5, " water");
  417.         println("setblock ", x + 1, " ", y - 71, " ", z + 5, " iron_trapdoor[half=top]");
  418. //紫色管道传送
  419.         println("setblock ", x + 115, " ", y - 71, " ", z - 62, " water");
  420.         println("setblock ", x + 114, " ", y - 71, " ", z - 55, " iron_trapdoor[half=top]");
  421.         println("setblock ", x + 114, " ", y - 71, " ", z - 54, " water");
  422.         println("setblock ", x + 111, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  423.         println("setblock ", x + 110, " ", y - 71, " ", z - 49, " water");
  424.         println("setblock ", x + 102, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  425.         println("setblock ", x + 101, " ", y - 71, " ", z - 49, " water");
  426.         println("setblock ", x + 93, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  427.         println("setblock ", x + 92, " ", y - 71, " ", z - 49, " water");
  428.         println("setblock ", x + 84, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  429.         println("setblock ", x + 83, " ", y - 71, " ", z - 49, " water");
  430.         println("setblock ", x + 75, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  431.         println("setblock ", x + 74, " ", y - 71, " ", z - 49, " water");
  432.         println("setblock ", x + 66, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  433.         println("setblock ", x + 65, " ", y - 71, " ", z - 49, " water");
  434.         println("setblock ", x + 58, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  435.         println("setblock ", x + 57, " ", y - 71, " ", z - 49, " water");
  436.         println("setblock ", x + 49, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  437.         println("setblock ", x + 48, " ", y - 71, " ", z - 49, " water");
  438. //黄色管道传送
  439.         println("setblock ", x + 42, " ", y - 71, " ", z - 57, " water");
  440.         println("setblock ", x + 40, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  441.         println("setblock ", x + 39, " ", y - 71, " ", z - 49, " water");
  442.         println("setblock ", x + 31, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  443.         println("setblock ", x + 30, " ", y - 71, " ", z - 49, " water");
  444.         println("setblock ", x + 21, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  445.         println("setblock ", x + 20, " ", y - 71, " ", z - 49, " water");
  446.         println("setblock ", x + 11, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  447.         println("setblock ", x + 10, " ", y - 71, " ", z - 49, " water");
  448.         println("setblock ", x + 2, " ", y - 71, " ", z - 49, " iron_trapdoor[half=top]");
  449.         println("setblock ", x - 1, " ", y - 71, " ", z + 6, " oak_fence_gate[open=true]");
  450.         println("setblock ", x - 2, " ", y - 71, " ", z + 7, " oak_fence_gate[open=true]");
  451.         println("fill ", x - 1, " ", y - 16, " ", z + 6, " ", x - 3, " ", y - 70, " ", z + 6, " glass replace");
  452.         println("fill ", x - 2, " ", y - 16, " ", z + 7, " ", x - 2, " ", y - 70, " ", z + 5, " glass replace");
  453.         println("setblock ", x - 2, " ", y - 72, " ", z + 6, " soul_sand replace");
  454.         println("fill ", x - 2, " ", y - 71, " ", z + 6, " ", x - 2, " ", y - 16, " ", z + 6, " water replace");
  455.         println("setblock ", x - 2, " ", y - 15, " ", z + 6, " sea_lantern replace");
  456.         println("setblock ", x - 1, " ", y - 16, " ", z + 5, " oak_fence_gate[open=true]");
  457.         println("setblock ", x - 1, " ", y - 16, " ", z + 7, " oak_fence_gate[open=true]");
  458.         println("setblock ", x + 1, " ", y - 72, " ", z - 49, " soul_sand replace");
  459.         println("setblock ", x, " ", y - 16, " ", z + 6, " glass");
  460.         println("setblock ", x - 1, " ", y - 16, " ", z + 6, " air replace");
  461.         println("fill ", x - 1, " ", y - 19, " ", z + 6, " ", x - 1, " ", y - 17, " ", z + 6, " hopper[facing=east] replace");
  462.         println("setblock ", x, " ", y - 19, " ", z + 6, " chest[type=single] replace");
  463.         println("setblock ", x, " ", y - 18, " ", z + 6, " chest[type=single] replace");
  464.         println("setblock ", x, " ", y - 17, " ", z + 6, " chest[type=single] replace");
  465.         println("setblock ", x + 1, " ", y - 19, " ", z + 6, " chest[type=right] replace");
  466.         println("setblock ", x + 1, " ", y - 18, " ", z + 6, " chest[type=right] replace");
  467.         println("setblock ", x + 1, " ", y - 17, " ", z + 6, " chest[type=right] replace");
  468.     }
  469. }

  470. class Village {
  471.     protected static final String[] GLASSES = {
  472.             "glass",
  473.             "red_stained_glass",
  474.             "pink_stained_glass",
  475.             "orange_stained_glass",
  476.             "yellow_stained_glass",
  477.             "lime_stained_glass",
  478.             "green_stained_glass",
  479.             "cyan_stained_glass",
  480.             "light_blue_stained_glass",
  481.             "blue_stained_glass",
  482.             "magenta_stained_glass",
  483.             "purple_stained_glass",
  484.             "white_stained_glass",
  485.     };
  486.     protected int x;
  487.     protected int y;
  488.     protected int z;
  489.     protected PrintWriter pw;
  490.     private int index;
  491.     private String block;
  492.     private String stairs;
  493.     private String door;
  494.     private String slab;
  495.     private String blockBak;
  496.     private String glass;

  497.     protected Village() {
  498.     }

  499.     protected Village(int x, int y, int z) {
  500.         this.x = x;
  501.         this.y = y;
  502.         this.z = z;
  503.     }

  504.     public Village(int x, int y, int z, PrintWriter pw, int index) {
  505.         this(x, y, z);
  506.         this.index = index;
  507.         this.pw=pw;
  508.         Stone stone = Stone.get(index);
  509.         Stone door = Stone.door(index);
  510.         this.block = stone.getBlock();
  511.         this.slab = stone.getSlab();
  512.         this.stairs = stone.getStairs();
  513.         this.blockBak = stone.getBakBlock();
  514.         this.door = door.getDoor();
  515.         glass = GLASSES[index % 13];
  516.     }

  517.     private boolean underground() {
  518.         return y < 63;
  519.     }

  520.     private static String chain(Object... objs) {
  521.         StringBuilder sb = new StringBuilder();
  522.         for (Object obj : objs) {
  523.             sb.append(obj == null ? "" : obj);
  524.         }
  525.         return sb.toString();
  526.     }

  527.     protected void println(Object... objs) {
  528.         pw.println(chain(objs));
  529.     }


  530.     private Village drawPeople() {
  531.         Random random = new Random();
  532.         println("summon villager ", x + 16, " ", y - 3, " ", z + 16, makeVillager(random));
  533.         println("summon villager ", x + 16, " ", y - 3, " ", z + 16, makeVillager(random));
  534.         println("summon villager ", x + 16, " ", y - 3, " ", z + 16, makeVillager(random));
  535.         println("summon villager ", x + 1, " ", y - 3, " ", z + 16, makeVillager(random));
  536.         println("summon villager ", x + 1, " ", y - 3, " ", z + 16, makeVillager(random));
  537.         println("summon villager ", x + 1, " ", y - 3, " ", z + 1, makeVillager(random));
  538.         println("summon villager ", x + 1, " ", y - 3, " ", z + 1, makeVillager(random));
  539.         println("summon villager ", x + 1, " ", y - 3, " ", z + 1, makeVillager(random));
  540.         println("summon villager ", x + 16, " ", y - 3, " ", z + 1, makeVillager(random));
  541.         println("summon villager ", x + 16, " ", y - 3, " ", z + 1, makeVillager(random));
  542.         return this;
  543.     }

  544.     private Village drawWall() {
  545.         drawNorth();
  546.         drawSouth();
  547.         drawWest();
  548.         drawEast();
  549.         return this;
  550.     }

  551.     public void draw() {
  552.         fillAir().drawUpFloor().drawDownFloor().drawWall().drawPeople();
  553.     }

  554.     /**
  555.      * 填充空气
  556.      */
  557.     private Village fillAir() {
  558.         //如果在地下
  559.         if (underground()) {
  560.             println("fill ", x - 2, " ", y + 5, " ", z - 2, " ", x + 19, " ", y - 7, " ", z + 19, " ", glass, " replace lava");
  561.             println("fill ", x - 3, " ", y + 4, " ", z - 3, " ", x + 20, " ", y - 7, " ", z + 20, " glowstone replace mossy_cobblestone");
  562.             //设置天花板
  563.             println("fill ", x - 2, " ", y + 4, " ", z - 2, " ", x + 19, " ", y + 4, " ", z + 19, " glowstone keep");
  564.             println("fill ", x - 2, " ", y + 3, " ", z - 2, " ", x + 19, " ", y + 1, " ", z + 19, " ", glass, " replace");
  565.             println("fill ", x - 2, " ", y + 4, " ", z - 2, " ", x + 19, " ", y + 3, " ", z + 19, " glowstone replace lava");
  566.             println("fill ", x - 2, " ", y + 4, " ", z - 2, " ", x + 19, " ", y + 3, " ", z + 19, " glowstone replace water");
  567.             println("fill ", x - 2, " ", y + 4, " ", z - 2, " ", x + 19, " ", y + 3, " ", z + 19, " glowstone replace seagrass");
  568.             println("fill ", x - 2, " ", y + 4, " ", z - 2, " ", x + 19, " ", y + 3, " ", z + 19, " glowstone replace tall_seagrass");
  569.             println("fill ", x - 2, " ", y + 4, " ", z - 2, " ", x + 19, " ", y + 3, " ", z + 19, " glowstone replace kelp_plant");
  570.             println("fill ", x, " ", y + 4, " ", z, " ", x + 17, " ", y + 3, " ", z + 17, " glowstone replace gravel");

  571.             //防止岩浆穿透
  572.             println("fill ", x + 19, " ", y, " ", z + 6, " ", x + 8, " ", y - 4, " ", z + 11, " ", glass, " replace lava");
  573.             println("fill ", x + 11, " ", y, " ", z + 19, " ", x + 6, " ", y - 4, " ", z + 18, " ", glass, " replace lava");
  574.             println("fill ", x - 2, " ", y, " ", z + 11, " ", x - 1, " ", y - 4, " ", z + 7, " ", glass, " replace lava");
  575.             println("fill ", x + 7, " ", y, " ", z - 2, " ", x + 11, " ", y - 4, " ", z - 1, " ", glass, " replace lava");

  576.             int top = index == 0 ? 63 : 62;
  577.             //垂直贯穿 东
  578.             println("fill ", x + 19, " ", top, " ", z + 12, " ", x + 17, " ", y - 4, " ", z + 6, " ", glass, " replace");
  579.             println("fill ", x + 18, " ", 72, " ", z + 11, " ", x + 18, " ", y - 4, " ", z + 7, " air replace");

  580.             //垂直贯穿北
  581.             println("fill ", x + 12, " ", top, " ", z - 2, " ", x + 6, " ", y - 4, " ", z, " ", glass, " replace");
  582.             println("fill ", x + 11, " ", 72, " ", z - 1, " ", x + 7, " ", y - 4, " ", z - 1, " air replace");
  583.             //垂直贯穿 西
  584.             println("fill ", x, " ", top, " ", z + 6, " ", x - 2, " ", y - 4, " ", z + 12, " ", glass, " replace");
  585.             println("fill ", x - 1, " ", 72, " ", z + 7, " ", x - 1, " ", y - 4, " ", z + 11, " air replace");
  586.             //垂直贯穿 南
  587.             println("fill ", x + 6, " ", top, " ", z + 17, " ", x + 13, " ", y - 4, " ", z + 19, " ", glass, " replace");
  588.             println("fill ", x + 7, " ", 72, " ", z + 18, " ", x + 12, " ", y - 4, " ", z + 18, " air replace");
  589.         }
  590.         //填充空气
  591.         println("fill ", x, " ", y + 3, " ", z, " ", x + 17, " ", y - 4, " ", z + 17, " air replace");
  592.         return this;
  593.     }

  594.     private Village drawUpFloor() {
  595.         println("fill ", x + 1, " ", y - 1, " ", z + 1, " ", x + 16, " ", y - 1, " ", z + 16, " ", slab, "[type=top] replace");
  596.         println("fill ", x + 8, " ", y - 1, " ", z + 8, " ", x + 9, " ", y - 1, " ", z + 9, " air replace");
  597.         return this;
  598.     }

  599.     private Village drawDownFloor() {
  600.         println("fill ", x + 1, " ", y - 5, " ", z + 1, " ", x + 16, " ", y - 5, " ", z + 16, " packed_ice replace");
  601.         println("fill ", x + 8, " ", y - 5, " ", z + 8, " ", x + 9, " ", y - 5, " ", z + 9, " air replace");

  602.         println("fill ", x + 1, " ", y, " ", z + 1, " ", x + 1, " ", y, " ", z + 1, " glowstone replace");
  603.         println("fill ", x + 1, " ", y - 4, " ", z + 1, " ", x + 1, " ", y - 4, " ", z + 1, " glowstone replace");
  604.         println("fill ", x + 1, " ", y - 2, " ", z + 2, " ", x + 1, " ", y - 3, " ", z + 2, " ", glass, " replace");
  605.         println("fill ", x + 2, " ", y - 2, " ", z + 1, " ", x + 2, " ", y - 3, " ", z + 1, " ", glass, " replace");

  606.         println("fill ", x + 16, " ", y, " ", z + 1, " ", x + 16, " ", y, " ", z + 1, " glowstone replace");
  607.         println("fill ", x + 16, " ", y - 4, " ", z + 1, " ", x + 16, " ", y - 4, " ", z + 1, " glowstone replace");
  608.         println("fill ", x + 16, " ", y - 2, " ", z + 2, " ", x + 16, " ", y - 3, " ", z + 2, " ", glass, " replace");
  609.         println("fill ", x + 15, " ", y - 2, " ", z + 1, " ", x + 15, " ", y - 3, " ", z + 1, " ", glass, " replace");

  610.         println("fill ", x + 1, " ", y, " ", z + 16, " ", x + 1, " ", y, " ", z + 16, " glowstone replace");
  611.         println("fill ", x + 1, " ", y - 4, " ", z + 16, " ", x + 1, " ", y - 4, " ", z + 16, " glowstone replace");
  612.         println("fill ", x + 2, " ", y - 2, " ", z + 16, " ", x + 2, " ", y - 3, " ", z + 16, " ", glass, " replace");
  613.         println("fill ", x + 1, " ", y - 2, " ", z + 15, " ", x + 1, " ", y - 3, " ", z + 15, " ", glass, " replace");

  614.         println("fill ", x + 16, " ", y, " ", z + 16, " ", x + 16, " ", y, " ", z + 16, " glowstone replace");
  615.         println("fill ", x + 16, " ", y - 4, " ", z + 16, " ", x + 16, " ", y - 4, " ", z + 16, " glowstone replace");
  616.         println("fill ", x + 16, " ", y - 2, " ", z + 15, " ", x + 16, " ", y - 3, " ", z + 15, " ", glass, " replace");
  617.         println("fill ", x + 15, " ", y - 2, " ", z + 16, " ", x + 15, " ", y - 3, " ", z + 16, " ", glass, " replace");
  618.         if (underground()) {
  619.             println("fill ", x + 9, " ", y - 6, " ", z + 10, " ", x + 8, " ", y - 7, " ", z + 10, " ", glass, " replace");
  620.             println("fill ", x + 9, " ", y - 6, " ", z + 7, " ", x + 8, " ", y - 7, " ", z + 7, " ", glass, " replace");
  621.             println("fill ", x + 10, " ", y - 6, " ", z + 8, " ", x + 10, " ", y - 7, " ", z + 9, " ", glass, " replace");
  622.             println("fill ", x + 7, " ", y - 6, " ", z + 8, " ", x + 7, " ", y - 7, " ", z + 9, " ", glass, " replace");

  623.             println("fill ", x + 9, " ", y - 8, " ", z + 9, " ", x + 8, " ", y - 8, " ", z + 8, " blue_ice replace");
  624.             println("fill ", x + 9, " ", y - 6, " ", z + 9, " ", x + 8, " ", y - 7, " ", z + 8, " air replace");
  625.             println("fill ", x + 8, " ", y - 6, " ", z + 8, " ", x + 9, " ", y - 6, " ", z + 8, " wall_sign[facing=south] replace");
  626.             println("fill ", x + 8, " ", y - 6, " ", z + 9, " ", x + 9, " ", y - 6, " ", z + 9, " wall_sign[facing=north] replace");
  627.             println("fill ", x + 8, " ", y - 5, " ", z + 8, " ", x + 9, " ", y - 5, " ", z + 9, " lava replace");
  628.         } else {
  629.             println("fill ", x + 9, " ", y - 6, " ", z + 10, " ", x + 8, " ", y - 60, " ", z + 10, " ", glass, " replace");
  630.             println("fill ", x + 9, " ", y - 6, " ", z + 7, " ", x + 8, " ", y - 60, " ", z + 7, " ", glass, " replace");
  631.             println("fill ", x + 10, " ", y - 6, " ", z + 8, " ", x + 10, " ", y - 60, " ", z + 9, " ", glass, " replace");
  632.             println("fill ", x + 7, " ", y - 6, " ", z + 8, " ", x + 7, " ", y - 60, " ", z + 9, " ", glass, " replace");
  633.             println("fill ", x + 9, " ", y - 6, " ", z + 9, " ", x + 8, " ", y - 60, " ", z + 8, " air replace");
  634.         }

  635.         return this;
  636.     }

  637.     private void drawNorth() {
  638.         println("fill ", x, " ", y, " ", z, " ", x + 17, " ", y, " ", z, " ", stairs, "[facing=north,waterlogged=true] replace");
  639.         println("fill ", x, " ", y - 1, " ", z, " ", x + 17, " ", y - 3, " ", z, " ", block, " replace");
  640.         println("fill ", x, " ", y - 4, " ", z, " ", x + 17, " ", y - 4, " ", z, " ", stairs, "[facing=north,waterlogged=true] replace");
  641.         println("fill ", x, " ", y - 5, " ", z, " ", x + 17, " ", y - 5, " ", z, " ", blockBak, " replace");

  642.         println("fill ", x + 7, " ", y - 1, " ", z, " ", x + 11, " ", y - 1, " ", z, " ", door, "[facing=south,half=upper] replace");
  643.         println("fill ", x + 7, " ", y - 2, " ", z, " ", x + 11, " ", y - 2, " ", z, " ", door, "[facing=south,half=lower] replace");
  644.         println("setblock ", x + 7, " ", y - 4, " ", z - 1, " wall_torch[facing=north] replace");
  645.         println("setblock ", x + 11, " ", y - 4, " ", z - 1, " wall_torch[facing=north] replace");
  646.     }

  647.     private void drawSouth() {
  648.         println("fill ", x, " ", y, " ", z + 17, " ", x + 17, " ", y, " ", z + 17, " ", stairs, "[facing=south,waterlogged=true] replace");
  649.         println("fill ", x, " ", y - 1, " ", z + 17, " ", x + 17, " ", y - 3, " ", z + 17, " ", block, " replace");
  650.         println("fill ", x, " ", y - 4, " ", z + 17, " ", x + 17, " ", y - 4, " ", z + 17, " ", stairs, "[facing=south,waterlogged=true] replace");
  651.         println("fill ", x, " ", y - 5, " ", z + 17, " ", x + 17, " ", y - 5, " ", z + 17, " ", blockBak, " replace");

  652.         println("fill ", x + 7, " ", y - 1, " ", z + 17, " ", x + 12, " ", y - 1, " ", z + 17, " ", door, "[facing=north,half=upper] replace");
  653.         println("fill ", x + 7, " ", y - 2, " ", z + 17, " ", x + 12, " ", y - 2, " ", z + 17, " ", door, "[facing=north,half=lower] replace");

  654.         println("setblock ", x + 7, " ", y - 4, " ", z + 18, " wall_torch[facing=south] replace");
  655.         println("setblock ", x + 12, " ", y - 4, " ", z + 18, " wall_torch[facing=south] replace");
  656.     }

  657.     private void drawWest() {
  658.         println("fill ", x, " ", y, " ", z + 1, " ", x, " ", y, " ", z + 16, " ", stairs, "[facing=west,waterlogged=true] replace");
  659.         println("fill ", x, " ", y - 1, " ", z + 1, " ", x, " ", y - 3, " ", z + 16, " ", block, " replace");
  660.         println("fill ", x, " ", y - 4, " ", z + 1, " ", x, " ", y - 4, " ", z + 16, " ", stairs, "[facing=west,waterlogged=true] replace");
  661.         println("fill ", x, " ", y - 5, " ", z + 1, " ", x, " ", y - 5, " ", z + 16, " ", blockBak, " replace");

  662.         println("fill ", x, " ", y - 1, " ", z + 7, " ", x, " ", y - 1, " ", z + 11, " ", door, "[facing=east,half=upper] replace");
  663.         println("fill ", x, " ", y - 2, " ", z + 7, " ", x, " ", y - 2, " ", z + 11, " ", door, "[facing=east,half=lower] replace");

  664.         println("setblock ", x - 1, " ", y - 4, " ", z + 7, " wall_torch[facing=west] replace");
  665.         println("setblock ", x - 1, " ", y - 4, " ", z + 11, " wall_torch[facing=west] replace");
  666.     }

  667.     private void drawEast() {
  668.         println("fill ", x + 17, " ", y, " ", z, " ", x + 17, " ", y, " ", z + 16, " ", stairs, "[facing=east,waterlogged=true] replace");
  669.         println("fill ", x + 17, " ", y - 1, " ", z, " ", x + 17, " ", y - 3, " ", z + 16, " ", block, " replace");
  670.         println("fill ", x + 17, " ", y - 4, " ", z, " ", x + 17, " ", y - 4, " ", z + 16, " ", stairs, "[facing=east,waterlogged=true] replace");
  671.         println("fill ", x + 17, " ", y - 5, " ", z, " ", x + 17, " ", y - 5, " ", z + 16, " ", blockBak, " replace");

  672.         println("fill ", x + 17, " ", y - 1, " ", z + 7, " ", x + 17, " ", y - 1, " ", z + 11, " ", door, "[facing=west,half=upper] replace");
  673.         println("fill ", x + 17, " ", y - 2, " ", z + 7, " ", x + 17, " ", y - 2, " ", z + 11, " ", door, "[facing=west,half=lower] replace");
  674.         println("setblock ", x + 18, " ", y - 4, " ", z + 11, " wall_torch[facing=east] replace");
  675.         println("setblock ", x + 18, " ", y - 4, " ", z + 7, " wall_torch[facing=east] replace");
  676.     }

  677.     private String makeVillager(Random random) {
  678.         int profession = random.nextInt(5);
  679.         int career = 1;
  680.         switch (profession) {
  681.             case 0:
  682.                 career = random.nextInt(4) + 1;
  683.                 break;
  684.             case 1:
  685.             case 4:
  686.                 career = random.nextInt(2) + 1;
  687.                 break;
  688.             case 2:
  689.                 career = 1;
  690.                 break;
  691.             case 3:
  692.                 career = random.nextInt(3) + 1;
  693.                 break;
  694.             default:
  695.                 break;
  696.         }
  697.         return chain(" {PersistenceRequired:1,Profession:", profession, ",Career:", career, ",CareerLevel:0}");
  698.     }
  699. }

  700. enum Stone {
  701.     oak("oak_planks", "oak_stairs", "oak_slab", "oak_door", "stripped_oak_log", "橡木"),
  702.     spruce("spruce_planks", "spruce_stairs", "spruce_slab", "spruce_door", "stripped_spruce_log", "云杉木"),
  703.     birch("birch_planks", "birch_stairs", "birch_slab", "birch_door", "stripped_birch_log", "白桦木"),
  704.     jungle("jungle_planks", "jungle_stairs", "jungle_slab", "jungle_door", "stripped_jungle_log", "丛林木"),
  705.     acacia("acacia_planks", "acacia_stairs", "acacia_slab", "acacia_door", "stripped_acacia_log", "合欢金木"),
  706.     dark_oak("dark_oak_planks", "dark_oak_stairs", "dark_oak_slab", "dark_oak_door", "stripped_dark_oak_log", "深色橡木"),
  707.     stone_bricks("stone_bricks", "stone_brick_stairs", "stone_brick_slab", null, "chiseled_stone_bricks", "石砖"),
  708.     bricks("bricks", "brick_stairs", "brick_slab", null, "polished_granite", "砖"),
  709.     cut_red_sandstone("cut_red_sandstone", "red_sandstone_stairs", "red_sandstone_slab", null, "chiseled_red_sandstone", "红砂岩"),
  710.     cut_sandstone("cut_sandstone", "sandstone_stairs", "sandstone_slab", null, "chiseled_sandstone", "砂岩"),
  711.     quartz("smooth_quartz", "quartz_stairs", "quartz_slab", null, "chiseled_quartz_block", "石英"),
  712.     prismarine_brick("prismarine_bricks", "prismarine_brick_stairs", "prismarine_brick_slab", null, "green_concrete", "海晶石砖"),
  713.     purpur("purpur_block", "purpur_stairs", "purpur_slab", null, "purpur_pillar", "紫柏");

  714.     Stone(String block, String stairs, String slab, String door, String bakBlock, String desc) {
  715.         this.block = block;
  716.         this.stairs = stairs;
  717.         this.slab = slab;
  718.         this.door = door;
  719.         this.bakBlock = bakBlock;
  720.         this.desc = desc;
  721.         this.inflammable = door != null;
  722.     }

  723.     private String block;
  724.     private String stairs;
  725.     private String slab;
  726.     private String door;
  727.     private String desc;
  728.     private String bakBlock;
  729.     private boolean inflammable;
  730.     private static final List<Stone> VALUES = Arrays.asList(values());

  731.     public static Stone get(int i) {
  732.         return VALUES.get(i % 13);
  733.     }

  734.     public static Stone door(int i) {
  735.         return VALUES.get(i % 6);
  736.     }

  737.     public String getBlock() {
  738.         return block;
  739.     }

  740.     public String getStairs() {
  741.         return stairs;
  742.     }

  743.     public String getSlab() {
  744.         return slab;
  745.     }

  746.     public String getDoor() {
  747.         return door;
  748.     }
  749.     public String getBakBlock() {
  750.         return bakBlock;
  751.     }

  752.     public boolean isInflammable() {
  753.         return inflammable;
  754.     }
  755. }
复制代码



zonmasgh
代码24行和31行被网站转义了, 分别是 "datapacks\\datapack\\data\\datapack\\functions\\";
和pw.print("{\n \"pack\": {\n \"pack_format\": 3,\n \"description\": \"Test\"\n }\n}");
网站展示的空白字符 \U+00A0 编辑器报错,请自行替换
铁块理论生成量为:
52村庄*3600秒*20刻*一次4个铁块/7000标准生成几率=2139.43个

1723624171
好长,不过是1.13的问题不是1.12的

鬼畜畜
现在的新人都是怪物.jpg

权威的空气
不如发个github

1453🐱
厉害啊!虽然不大懂。

小图的世界
。。。代码完全看不懂

第一页 上一页 下一页 最后一页