玩家用命令方块制作了Jeb剧透的新方块“混凝土”功能

具体效果上面gif一目了然,当然我并不是完全按照他还原:

OOC:
  1. /summon falling_block ~ ~1.5 ~ {Time:1,Block:minecraft:redstone_block,Motion:[0d,-1d,0d],Passengers:[{id:falling_block,Time:1,Block:minecraft:activator_rail,Passengers:[{id:commandblock_minecart,Command:blockdata ~ ~-2 ~ {auto:0b,Command:""}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~14 chain_command_block 3 replace {Command:"/kill @e[tag=rsd]",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~13 chain_command_block 3 replace {Command:"/execute @e[tag=rsss] ~ ~ ~ detect ~ ~ ~ air 0 fill ~ ~-1 ~ ~ ~ ~-1 air 0 replace red_sandstone 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~12 chain_command_block 3 replace {Command:"/execute @e[tag=rsss] ~ ~ ~ detect ~ ~ ~ air 0 fill ~ ~-1 ~ ~ ~ ~1 air 0 replace red_sandstone 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~11 chain_command_block 3 replace {Command:"/execute @e[tag=rsss] ~ ~ ~ detect ~ ~ ~ air 0 fill ~-1 ~ ~ ~1 ~ ~ air 0 replace red_sandstone 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~10 chain_command_block 3 replace {Command:"/execute @e[tag=rsss] ~ ~ ~ detect ~ ~ ~ air 0 fill ~1 ~ ~ ~1 ~ ~ air 0 replace red_sandstone 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~9 chain_command_block 3 replace {Command:"/execute @e[tag=rsss] ~ ~ ~ detect ~ ~ ~ air 0 scoreboard players tag @e[r=0,tag=rsss] add rsd",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~-2 ~8 chain_command_block 3 replace {Command:"/execute @e[tag=rsss] ~ ~ ~ detect ~ ~ ~ air 0 summon minecraft:falling_block ~ ~-1 ~ {Block:\\"minecraft:red_sandstone\\",Time:1}",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~7 chain_command_block 3 replace {Command:"/execute @e[tag=rsss] ~ ~ ~ /kill @e[tag=rss,r=0]",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~6 chain_command_block 3 replace {Command:"/execute @e[tag=rsss] ~ ~ ~ tp @e[tag=rss,r=0] ~ -100 ~",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~5 chain_command_block 3 replace {Command:"/entitydata @e[tag=rsss] {Duration:21000000,Time:1s}",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~4 chain_command_block 3 replace {Command:"/execute @e[tag=rss] ~ ~ ~ summon area_effect_cloud ~ ~ ~ {Duration:210000000,Tags:[rsss]}",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~3 chain_command_block 3 replace {Command:"/execute @e[tag=rss] ~ ~ ~ setblock ~ ~ ~ minecraft:red_sandstone",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~2 chain_command_block 3 replace {Command:"/execute @e[tag=rs] ~ ~ ~ detect ~ ~ ~ minecraft:water 0 /execute @e[tag=rs] ~ ~ ~ detect ~ ~1 ~ minecraft:air 0 /kill @e[tag=rs,c=1]",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~1 chain_command_block 3 replace {Command:"/execute @e[tag=rs] ~ ~ ~ detect ~ ~ ~ minecraft:water 0 /execute @e[tag=rs] ~ ~ ~ detect ~ ~1 ~ minecraft:air 0 summon shulker ~ ~ ~ {NoAI:1b,Tags:[rss],Invulnerable:1,ActiveEffects:[{Id:14,Duration:9999999,Amplifier:50,Ambient:1}]}",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~-2 ~0 repeating_command_block 3 replace {Command:"/scoreboard players tag @e[type=falling_block] add rs {Block:\\"minecraft:sand\\",Data:1b}",auto:1b}"},{id:commandblock_minecart,Command:setblock ~ ~1 ~ command_block 0 replace {auto:1b,Command:fill ~ ~ ~ ~ ~-2 ~ air}},{id:commandblock_minecart,Command:kill @e[type=commandblock_minecart,r=1]}]}]}
复制代码

尽管整体效果差不多,但是我这里你可以直接使用命令生成固态/液态混凝土
  1. /give @p minecraft:spawn_egg 1 0 {EntityTag:{id:minecraft:shulker,Tags:[rss]},display:{Name:"生成固态混凝土"}}
复制代码
这个刷怪蛋生成固态混凝土,打掉形成液态混凝土
  1. /summon minecraft:falling_block ~ ~ ~ {Block:"minecraft:sand",Data:1,Time:1}
复制代码
生成液态混凝土(没加标签,其实就是红沙),落入水中立刻在水面上形成固态混凝土

分析命令:
  1. rcb:/scoreboard players tag @e[type=falling_block] add rs {Block:"minecraft:sand",Data:1b}
  2. *给液态混凝土加标签
  3. /execute @e[tag=rs] ~ ~ ~ detect ~ ~ ~ minecraft:water 0 /execute @e[tag=rs] ~ ~ ~ detect ~ ~1 ~ minecraft:air 0 summon shulker ~ ~ ~ {NoAI:1b,Tags:[rss],Invulnerable:1,ActiveEffects:[{Id:14,Duration:9999999,Amplifier:50,Ambient:1}]}
  4. /execute @e[tag=rs] ~ ~ ~ detect ~ ~ ~ minecraft:water 0 /execute @e[tag=rs] ~ ~ ~ detect ~ ~1 ~ minecraft:air 0 /kill @e[tag=rs,c=1]
  5. /execute @e[tag=rss] ~ ~ ~ setblock ~ ~ ~ minecraft:red_sandstone
  6. *如果落入水中,使用潜隐贝修正为整型坐标,并放置固态混凝土
  7. /execute @e[tag=rss] ~ ~ ~ summon area_effect_cloud ~ ~ ~ {Duration:210000000,Tags:[rsss]}
  8. /entitydata @e[tag=rsss] {Duration:21000000,Time:1s}
  9. *生成AEC作为实体标记
  10. /execute @e[tag=rsss] ~ ~ ~ tp @e[tag=rss,r=0] ~ -100 ~
  11. /execute @e[tag=rsss] ~ ~ ~ /kill @e[tag=rss,r=0]
  12. *销毁潜隐贝
  13. //破坏
  14. /execute @e[tag=rsss] ~ ~ ~ detect ~ ~ ~ air 0 summon minecraft:falling_block ~ ~-1 ~ {Block:"minecraft:red_sandstone",Time:1}
  15. /execute @e[tag=rsss] ~ ~ ~ detect ~ ~ ~ air 0 scoreboard players tag @e[r=0,tag=rsss] add rsd
  16. *检测到固态混凝土被破坏,给实体标记添加'待销毁'标签
  17. /execute @e[tag=rsss] ~ ~ ~ detect ~ ~ ~ air 0 fill ~1 ~ ~ ~1 ~ ~ air 0 replace red_sandstone 0
  18. /execute @e[tag=rsss] ~ ~ ~ detect ~ ~ ~ air 0 fill ~-1 ~ ~ ~1 ~ ~ air 0 replace red_sandstone 0
  19. /execute @e[tag=rsss] ~ ~ ~ detect ~ ~ ~ air 0 fill ~ ~-1 ~ ~ ~ ~1 air 0 replace red_sandstone 0
  20. /execute @e[tag=rsss] ~ ~ ~ detect ~ ~ ~ air 0 fill ~ ~-1 ~ ~ ~ ~-1 air 0 replace red_sandstone 0
  21. *连锁反应
  22. /kill @e[tag=rsd]
  23. *销毁实体标记(完全销毁混凝土方块)
复制代码

命令还蛮简单,有几个地方还是要说一说
1.连锁反应并不像gif所表现的,如果是20gt高频,则是非常迅速的连锁反应;想要看到gif中的连锁反应可以选择频率较低的高频驱动模块
2.比起gif,你也可以破坏水面上的固态混凝土,结果是液态混凝土沉入水中(形成红沙)
3.用潜隐贝来正位是为了防止当实体进入水中运动速率改变后检测坐标上轻微的位移,只是为了保险起见(这种情况在帧数较低下比较明显)[groupid=546]Command Block Logic[/groupid]