Skip to content

Instantly share code, notes, and snippets.

@anthony1204
Created January 19, 2024 06:33
Show Gist options
  • Save anthony1204/dc15c0fe692e65f92e5569d394e75c63 to your computer and use it in GitHub Desktop.
Save anthony1204/dc15c0fe692e65f92e5569d394e75c63 to your computer and use it in GitHub Desktop.
say test2
say put a new line for more commands
execute as @p run say it worked!
say it sets the commandblcokoutput to false also.
summon falling_block ~ ~.5 ~ {Time:1,BlockState:{Name:redstone_block},Passengers:[{id:armor_stand,Health:0,Passengers:[{id:falling_block,Time:1,BlockState:{Name:activator_rail},Passengers:[{id:command_block_minecart,Command:'gamerule sendCommandFeedback false'},{id:command_block_minecart,Command:'say test'},{id:command_block_minecart,Command:'say tes2'},{id:command_block_minecart,Command:'setblock ~ ~1 ~ command_block{auto:1,Command:"fill ~ ~ ~ ~ ~-3 ~ air"}'},{id:command_block_minecart,Command:'kill @e[type=command_block_minecart,distance=..1]'}]}]}]}
with open("cmds") as f:
cmds = [ i.split("\n")[0] for i in f.readlines() ]
out = 'summon falling_block ~ ~.5 ~ {Time:1,BlockState:{Name:redstone_block},Passengers:[{id:armor_stand,Health:0,Passengers:[{id:falling_block,Time:1,BlockState:{Name:activator_rail},Passengers:['
out += "{id:command_block_minecart,Command:'gamerule sendCommandFeedback false'},"
for i in cmds:
out += ''
out += "{id:command_block_minecart,Command:'"+ i +"'},"
#out = out[:-13] + "}"
#for i in cmds:
# out += "]}"
out += "{id:command_block_minecart,Command:'setblock ~ ~1 ~ command_block{auto:1,Command:\"fill ~ ~ ~ ~ ~-3 ~ air\"}'},"
out += "{id:command_block_minecart,Command:'kill @e[type=command_block_minecart,distance=..1]'}]}]}]}"
print(out)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment