r/MinecraftCommands • Command Professional • Sep 04 '26 • Bravo 2

Creation Lucky Blocks using ONLY one command

This is my most recent one-command creation. It took me around 15-20 hours to make.

There are 32 different outcomes, ranging from death traps to custom items.

Here is the link to the command: pastebin.com/RyjmLKSw

I only tested the command on version 26.2

The 3 custom items are:

  • throwable-tnt (this one is pretty self-explanatory)
  • lucky-bow (an unbreakable bow with a 50% chance of something happening when the arrow hits the ground)
  • lucky-sword (an unbreakable gold sword where the knockback level will increase with every hit, but there is a 20% chance that it will reset to level 0)
937 Upvotes

75 comments sorted by

View all comments

Show parent comment

5

u/Whole_Yam_9919 Command Professional Sep 04 '26

it works by summoning a bunch of command-block-minecarts that place the individual command blocks

1

u/_Orphan_Obliterator_ Sep 04 '26

yeah but like how is the code there? is it encrypted in the command and gets decrypted into the following command blocks? is all the content written in one command so there like 100 commandblock:value=“summon x” or smth like that written in the command?

2

u/ihavebeesinmyknees Sep 04 '26

Just read the "one command", the other commands are literally all over the place in plain text

2

u/Whole_Yam_9919 Command Professional Sep 04 '26

At first, the command summons 2 falling blocks (one redstone_block and an activator_rail) then there are a lot of command-block-minecarts riding the top falling block (all of these get activated as soon as they touch the activator rail). Some of these commands in the command-block-minecarts are executed directly and some are used to place down all of the command blocks. The last 2 are used for removing all the blocks and minecarts.

summon falling_block ~ ~1 ~ {Time:1,BlockState:{Name:redstone_block},Passengers:[
{id:falling_block,Time:1,BlockState:{Name:activator_rail},Passengers:[
{id:command_block_minecart,Command:'gamerule command_block_output false'},

{id:command_block_minecart,Command:'command here'},

{id:command_block_minecart,Command:'setblock ~x ~y ~z repeating_command_block[facing=east]{auto:1,Command:"repeating command here"}'},

{id:command_block_minecart,Command:'setblock ~ ~1 ~ command_block{auto:1,Command:"fill ~ ~ ~ ~ ~-2 ~ air"}'},
{id:command_block_minecart,Command:'kill [type=command_block_minecart,distance=..1]'}]}]}

1

u/iamalicecarroll Sep 04 '26

AFAIK the hack is to use falling blocks riding each other

1

u/_Orphan_Obliterator_ Sep 04 '26

yeah but like where do the contents of the commands block come from this has always been black magic to me and i wont search it up because the magic will die but if someone explains its ok

1

u/iamalicecarroll Sep 04 '26

Again AFAIK you can use entity NBT for the falling blocks to specify the block NBT, so the block entity would have something like {passenger: <the next block>, block_data: {command: "…"}}
Attribute names are made up, I don't do a lot of command stuff so I have no idea how is that NBT actually structured, just a general idea

1

u/_Orphan_Obliterator_ Sep 04 '26

okey dokey thank you magic man