自定义围墙建造OOC

By MCSugar_cane    2017/10/8

此OOC包含功能有“自定义围墙样式” “一键生成” 以及 “取点相连”,编写版本为1.8.1,说明及代码见下。

模组演示图片 模组演示图片 模组演示图片 模组演示图片 模组演示图片 模组演示图片

图片就介绍到这里,下面是说明以及代码部分~


说明:

此系统可自定义围墙样式,大小,支持多连接,可多位置同时summon...等等骚操作

首先,将指令全部复制,粘贴(Ctrl+V)在一个命令方块里,然后激活。激活后可在任意位置建造围墙(恒加载区块内),建议在生成的水晶灯处建造,建造之后用你围墙的最低至最高的xyz填写进两个羊毛处的cb里xyzdxdydz位置,注意围墙大小只能为1 y 1,然后右击获取道具牌子,即可获得三个物品 "Replace" "Build" "Remove"。

Replace: 使用之后会出现1x 1z的单墙

Build: 使用之后红色点是Build点,绿色为Build线,Build线碰到障碍会回潮操作,Build线最长延伸40格左右,当Build线碰到Build点,Build线头碰到Build线头时,会自动回潮操作并建造围墙

Remove: 使用之后红色点是Build点,绿色为Build线,Build线碰到障碍会回潮操作,Build线最长延伸40格左右,当Build线碰到Build点,Build线头碰到Build线头时,会自动回潮操作并建造围墙


代码:

  1. summon MinecartCommandBlock ~ ~1 ~ {Command:kill @e[type=MinecartCommandBlock,r=1],Riding:{id:MinecartCommandBlock,Command:setblock ~ ~-1 ~-1 redstone_block,Riding:{id:MinecartCommandBlock,Command:setblock ~ ~ ~-1 command_block 0 replace {Command:fill ~ ~-3 ~ ~ ~ ~1 air},Riding:{id:MinecartCommandBlock,Command:"/tellraw @a [\"\",{\"text\":\"\\n\n\n\n\n\n\n\\n\\ 自定义围墙 By MCSugar_cane\n\",\"color\":\"dark_aqua\",\"bold\":\"true\"},{\"text\":\"\\n-----------------------------------\n 此模组全手打,没用任何编辑软件\n----------------------------------- \n 请建造出围墙后,在绿色羊毛和橙色羊毛的位置输入你围墙的最低和最高处坐标(围墙只能为1方块长宽,高度随意至最大值)\",\"color\":\"aqua\",\"bold\":\"false\"},{\"text\":\"\\n\n http://mcsugarcane.top \",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"http://Ganxiaozhe.com\"},\"color\":\"none\",\"bold\":\"false\"},{\"text\":\"\\n [交流群 481528679]\",\"color\":\"red\"}]",Riding:{id:MinecartCommandBlock,Command:"/scoreboard objectives add BuildTimer dummy",Riding:{id:MinecartCommandBlock,Command:"/scoreboard objectives add faceb dummy",Riding:{id:MinecartCommandBlock,Command:"/scoreboard objectives add testblock dummy",Riding:{id:MinecartCommandBlock,Command:"/scoreboard objectives add facebb dummy",Riding:{id:MinecartCommandBlock,Command:"/scoreboard objectives add witem dummy",Riding:{id:MinecartCommandBlock,Command:"setblock ~ ~-4 ~ sea_lantern",Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-2 ~3 {Command:fill ~1 ~ ~ ~1 ~2 ~7 air},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-2 ~3 {Command:fill ~-1 ~ ~ ~-1 ~2 ~7 redstone_block},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-2 ~4 {Command:"kill @e[type=Squid,name=Build]"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-2 ~5 {Command:"scoreboard players set @e[typr=ArmorStand,score_testblock_min=1,score_faceb_min=0,score_faceb=0] faceb 1"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-2 ~6 {Command:"scoreboard players set @e[type=ArmorStand,score_faceb_min=0,score_faceb=0] testblock 1"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-2 ~7 {Command:"execute @e[type=ArmorStand,name=testb1,score_faceb_min=0,score_faceb=0] ~ ~ ~ detect ~-1 ~ ~ minecraft:air 0 /scoreboard players set @e[type=ArmorStand,score_faceb_min=0,score_faceb=0,c=1] testblock 0"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-2 ~8 {Command:"execute @e[type=ArmorStand,name=testb2,score_faceb_min=0,score_faceb=0] ~ ~ ~ detect ~1 ~ ~ minecraft:air 0 /scoreboard players set @e[type=ArmorStand,score_faceb_min=0,score_faceb=0,c=1] testblock 0"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-2 ~9 {Command:"execute @e[type=ArmorStand,name=testb3,score_faceb_min=0,score_faceb=0] ~ ~ ~ detect ~ ~ ~-1 minecraft:air 0 /scoreboard players set @e[type=ArmorStand,score_faceb_min=0,score_faceb=0,c=1] testblock 0"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-2 ~10 {Command:"execute @e[type=ArmorStand,name=testb4,score_faceb_min=0,score_faceb=0] ~ ~ ~ detect ~ ~ ~1 minecraft:air 0 /scoreboard players set @e[type=ArmorStand,score_faceb_min=0,score_faceb=0,c=1] testblock 0"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-1 ~3 {Command:"scoreboard players set @e[type=ArmorStand,score_faceb_min=1,score_faceb=1] faceb 2"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-1 ~4 {Command:"execute @e[type=ArmorStand,score_faceb_min=0,score_faceb=0,score_BuildTimer_min=5] ~ ~ ~ execute @e[type=ArmorStand,score_faceb_min=0,score_faceb=0,score_BuildTimer_min=5,rm=1,r=2] ~ ~ ~ scoreboard players set @e[type=ArmorStand,score_faceb_min=0,score_faceb=0,score_BuildTimer_min=5,r=3] faceb 4"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-1 ~5 {Command:"scoreboard players set @e[type=ArmorStand,score_faceb_min=1,score_faceb=1] facebb 1"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-1 ~6 {Command:"tp @e[type=ArmorStand,name=testb1,score_faceb_min=2,score_faceb=2] ~.5 ~ ~"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-1 ~7 {Command:"tp @e[type=ArmorStand,name=testb2,score_faceb_min=2,score_faceb=2] ~-.5 ~ ~"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-1 ~8 {Command:"tp @e[type=ArmorStand,name=testb3,score_faceb_min=2,score_faceb=2] ~ ~ ~.5"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-1 ~9 {Command:"tp @e[type=ArmorStand,name=testb4,score_faceb_min=2,score_faceb=2] ~ ~ ~-.5"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~-1 ~10 {Command:"execute @e[type=ArmorStand,score_facebb_min=1,score_facebb=1] ~ ~ ~ fill ~ ~ ~ ~ ~ ~ air 0 replace stained_glass 5 "},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~ ~3 {Command:"execute @e[type=ArmorStand,score_faceb_min=3,score_faceb=3] ~ ~ ~ tellraw @a {text:\\\"[MCSugar_cane] \\\",color:dark_green,bold:true,extra:[{text:\\\" 探测到Build线附近没有Build存在,执行回滚操作\\\",color:red,bold:true}]}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~ ~4 {Command:"scoreboard players set @e[type=ArmorStand,score_faceb_min=3,score_faceb=3] facebb 1"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~ ~5 {Command:"scoreboard players set @e[type=ArmorStand,score_faceb_min=3,score_faceb=3] faceb 2"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~ ~6 {Command:"execute @e[type=ArmorStand,score_faceb_min=1,score_faceb=1] ~ ~ ~ tellraw @a {text:\\\"[MCSugar_cane] \\\",color:dark_green,bold:true,extra:[{text:\\\" 探测到有障碍,执行回滚操作\\\",color:red,bold:true}]}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~ ~7 {Command:"execute @e[type=ArmorStand,name=Build,score_BuildTimer_min=105] ~ ~ ~ scoreboard players set @e[type=ArmorStand,score_faceb_min=0,score_faceb=0,r=2] faceb 4"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~ ~8 {Command:"execute @e[type=Squid,name=Remove] ~ ~-1 ~ execute @e[type=ArmorStand,name=Build,r=1] ~ ~ ~ setblock ~ ~ ~ air"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~ ~9 {Command:"execute @e[type=Squid,name=Remove] ~ ~-1 ~ kill @e[type=ArmorStand,name=Build,r=1]"},Riding:{id:MinecartCommandBlock,Command:blockdata ~1 ~ ~10 {Command:"kill @e[type=Squid,name=Remove]"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-2 ~4 {Command:"execute @e[type=Squid,name=Build] ~ ~ ~ summon ArmorStand ~ ~ ~ {CustomName:\\\"Build\\\",NoBasePlate:1,NoGravity:1,Invisible:1}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-2 ~5 {Command:"execute @e[type=ArmorStand,name=Build,score_BuildTimer_min=1] ~ ~ ~ fill ~ ~ ~ ~ ~ ~ stained_glass 14 replace"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-2 ~6 {Command:"scoreboard players add @e[type=ArmorStand,score_faceb_min=0,score_faceb=0] BuildTimer 1"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-2 ~7 {Command:"scoreboard players set @e[type=ArmorStand,score_faceb_min=0,score_faceb=0,score_BuildTimer_min=100] faceb 3"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-2 ~8 {Command:"execute @e[type=ArmorStand,name=Build,score_BuildTimer_min=3,score_BuildTimer=3] ~ ~ ~ tellraw @a {text:\\\"[MCSugar_cane] \\\",color:dark_green,bold:true,extra:[{text:\\\" 开始探测四方位是否有Build线\\\",color:green,bold:true}]}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-2 ~9 {Command:"execute @e[type=ArmorStand,score_faceb_min=0,score_faceb=0] ~ ~ ~ fill ~ ~ ~ ~ ~ ~ stained_glass 5 replace air"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-2 ~10 {Command:"execute @e[type=ArmorStand,name=Build] ~ ~ ~ kill @e[type=ArmorStand,score_faceb_min=2,score_faceb=2,r=0]"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-1 ~3 {Command:"scoreboard players add @e[type=ArmorStand,name=testb1] faceb 0"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-1 ~4 {Command:"scoreboard players add @e[type=ArmorStand,name=testb2] faceb 0"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-1 ~5 {Command:"scoreboard players add @e[type=ArmorStand,name=testb3] faceb 0"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-1 ~6 {Command:"scoreboard players add @e[type=ArmorStand,name=testb4] faceb 0"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-1 ~7 {Command:"scoreboard players add @e[type=ArmorStand,name=Build] BuildTimer 1"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-1 ~8 {Command:"execute @e[type=Bat,name=Replace] ~ ~ ~ clone x y z dx dy dz ~ ~ ~ masked normal"},Riding:{id:MinecartCommandBlock,Command:setblock ~-3 ~-1 ~8 wool 1,Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-1 ~9 {Command:"kill @e[type=Bat,name=Replace]"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~-1 ~10 {Command:""},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~ ~3 {Command:"execute @e[type=ArmorStand,score_faceb_min=4,score_faceb=4] ~ ~ ~ tellraw @a {text:\\\"[MCSugar_cane] \\\",color:dark_green,bold:true,extra:[{text:\\\" 探测到存在互相探测,开始建造围墙\\\",color:aqua,bold:true}]}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~ ~4 {Command:"execute @e[type=ArmorStand,score_facebb_min=2,score_facebb=2] ~ ~ ~ /clone x y z dx dy dz ~ ~ ~ masked normal"},Riding:{id:MinecartCommandBlock,Command:setblock ~-3 ~ ~4 wool 5,Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~ ~5 {Command:"scoreboard players set @e[type=ArmorStand,score_faceb_min=4,score_faceb=4] facebb 2"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~ ~6 {Command:"scoreboard players set @e[type=ArmorStand,score_faceb_min=4,score_faceb=4] faceb 2"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~ ~7 {Command:"give @a[score_witem_min=1,score_witem=1] spawn_egg 1 65 {HideFlags:127,ench:[{id:34,lvl:10}],display:{Lore:[0:\\\"By MCSugar_cane\\\"],Name:\\\"Replace\\\"}}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~ ~8 {Command:"give @a[score_witem_min=1,score_witem=1] spawn_egg 1 94 {HideFlags:127,ench:[{id:34,lvl:10}],display:{Lore:[0:\\\"By MCSugar_cane\\\"],Name:\\\"Build\\\"}}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~ ~9 {Command:"give @a[score_witem_min=1,score_witem=1] spawn_egg 1 94 {HideFlags:127,ench:[{id:34,lvl:10}],display:{Lore:[0:\\\"By MCSugar_cane\\\"],Name:\\\"Remove\\\"}}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~-1 ~ ~10 {Command:"scoreboard players set @a[score_witem_min=1,score_witem=1] witem 0"},Riding:{id:MinecartCommandBlock,Command:blockdata ~ ~-3 ~3 {Command:"execute @e[type=ArmorStand,name=Build,score_BuildTimer_min=5,score_BuildTimer=5] ~ ~ ~ summon ArmorStand ~ ~ ~ {CustomName:\\\"testb1\\\",NoBasePlate:1,NoGravity:1,Invisible:1}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~ ~-3 ~4 {Command:"execute @e[type=ArmorStand,name=Build,score_BuildTimer_min=5,score_BuildTimer=5] ~ ~ ~ summon ArmorStand ~ ~ ~ {CustomName:\\\"testb2\\\",NoBasePlate:1,NoGravity:1,Invisible:1}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~ ~-3 ~5 {Command:"execute @e[type=ArmorStand,name=Build,score_BuildTimer_min=5,score_BuildTimer=5] ~ ~ ~ summon ArmorStand ~ ~ ~ {CustomName:\\\"testb3\\\",NoBasePlate:1,NoGravity:1,Invisible:1}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~ ~-3 ~6 {Command:"execute @e[type=ArmorStand,name=Build,score_BuildTimer_min=5,score_BuildTimer=5] ~ ~ ~ summon ArmorStand ~ ~ ~ {CustomName:\\\"testb4\\\",NoBasePlate:1,NoGravity:1,Invisible:1}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~ ~-3 ~7 {Command:"tp @e[type=ArmorStand,name=testb1,score_faceb_min=0,score_faceb=0] ~-.5 ~ ~"},Riding:{id:MinecartCommandBlock,Command:blockdata ~ ~-3 ~8 {Command:"tp @e[type=ArmorStand,name=testb2,score_faceb_min=0,score_faceb=0] ~.5 ~ ~"},Riding:{id:MinecartCommandBlock,Command:blockdata ~ ~-3 ~9 {Command:"tp @e[type=ArmorStand,name=testb3,score_faceb_min=0,score_faceb=0] ~ ~ ~-.5"},Riding:{id:MinecartCommandBlock,Command:blockdata ~ ~-3 ~10 {Command:"tp @e[type=ArmorStand,name=testb4,score_faceb_min=0,score_faceb=0] ~ ~ ~.5"},Riding:{id:MinecartCommandBlock,Command:setblock ~ ~-2 ~3 redstone_block,Riding:{id:MinecartCommandBlock,Command:fill ~-1 ~-2 ~3 ~-1 ~ ~10 command_block,Riding:{id:MinecartCommandBlock,Command:fill ~ ~-3 ~3 ~ ~-3 ~10 command_block,Riding:{id:MinecartCommandBlock,Command:fill ~1 ~-2 ~3 ~1 ~ ~10 command_block,Riding:{id:MinecartCommandBlock,Command:setblock ~ ~-3 ~1 wall_sign 1 replace {Text2:"{text:\\\"Destroy\\\",color:dark_red,italic:true,bold:true}",Text3:"{text:\\\"消除\\\",color:red,italic:true,bold:true,clickEvent:{action:\\\"run_command\\\",value:\\\"\\\"}}",Text4:"{text:\\\"\\\",clickEvent:{action:\\\"run_command\\\",value:\\\"fill ~2 ~ ~-1 ~-2 ~5 ~11 air 0 replace\\\"}}"},Riding:{id:MinecartCommandBlock,Command:setblock ~ ~-1 ~1 wall_sign 1 replace {Text2:"{text:\\\"获取道具\\\",color:dark_green,italic:true,bold:true}",Text3:"{text:\\\"Get Items\\\",color:gold,italic:true,bold:true}",Text4:"{text:\\\"\\\",clickEvent:{action:\\\"run_command\\\",value:\\\"scoreboard players set @p witem 1\\\"}}"},Riding:{id:MinecartCommandBlock,Command:setblock ~ ~1 ~1 wall_sign 1 replace {Text2:"{text:\\\"自定义围墙模组\\\",color:dark_gray,italic:true,bold:true}",Text3:"{text:\\\"By MCSugar_cane\\\",color:aqua,italic:true,bold:true}",Text4:"{text:\\\"\\\",clickEvent:{action:\\\"run_command\\\",value:\\\"\\\"}}"},Riding:{id:MinecartCommandBlock,Command:fill ~-2 ~-2 ~2 ~-2 ~1 ~2 stained_hardened_clay 13 replace stained_glass 5,Riding:{id:MinecartCommandBlock,Command:fill ~2 ~-2 ~2 ~2 ~1 ~2 stained_hardened_clay 13 replace stained_glass 5,Riding:{id:MinecartCommandBlock,Command:fill ~ ~-2 ~2 ~ ~1 ~2 stained_glass 13 replace stained_glass 5,Riding:{id:MinecartCommandBlock,Command:fill ~2 ~-2 ~2 ~-2 ~1 ~11 stained_glass 5 replace stained_hardened_clay 13,Riding:{id:MinecartCommandBlock,Command:fill ~2 ~-3 ~2 ~-2 ~1 ~11 stained_hardened_clay 13 hollow,Riding:{id:MinecartCommandBlock,Command:gamerule commandBlockOutput false,Riding:{id:MinecartCommandBlock,Riding:{id:FallingSand,Block:activator_rail,Time:1,Riding:{id:FallingSand,Block:redstone_block,Time:1,Riding:{id:FallingSand,Block:stone,Time:1}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}

欢迎加群交流划水:481528679