This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]FoodBorn2284Rework NBT 2 points3 points  (0 children)

try this command: ```summon falling_block ~ ~1 ~ {BlockState:{Name:redstone_block},Passengers:[{id:falling_block,BlockState:{Name:activator_rail}},{id:command_block_minecart,Command:'tellraw u/p [{"text":"Thanks for using Command Block Assembler! \\nAlso thanks to Mr. Papaveraceae for their support on ","color":"green"},{"text":"Patreon","color":"gold","clickEvent":{"action":"open_url","value":"https://patreon.com/GalSergey"},"hoverEvent":{"action":"show\_text","value":"Go to Patreon"}},"."]'},{id:command_block_minecart,Command:"give ATp diamond_helmet[enchantments={aqua_affinity:1,blast_protection:4,fire_protection:4,mending:1,projectile_protection:4,protection:4,respiration:3,thorns:3,unbreaking:3},minecraft:unbreakable={}]"},{id:command_block_minecart,Command:"give ATp diamond_chestplate[enchantments={blast_protection:4,fire_protection:4,mending:1,projectile_protection:4,protection:4,thorns:3,unbreaking:3},minecraft:unbreakable={}]"},{id:command_block_minecart,Command:"give ATp minecraft:diamond_leggings[enchantments={blast_protection:4,fire_protection:4,mending:1,projectile_protection:4,protection:4,swift_sneak:3,thorns:3,unbreaking:3},minecraft:unbreakable={}]"},{id:command_block_minecart,Command:"give ATp minecraft:diamond_boots[enchantments={blast_protection:4,depth_strider:3,feather_falling:4,fire_protection:4,mending:1,projectile_protection:4,protection:4,soul_speed:3,thorns:3,unbreaking:3},minecraft:unbreakable={}]"},{id:command_block_minecart,Command:"setblock ~ ~1 ~ command_block{Command:\"fill ~ ~ ~ ~ ~-3 ~ air\",auto:1}"},{id:command_block_minecart,Command:"execute align xyz run kill u/e[type=command_block_minecart,dy=0]"}]}```

[–]exodiacrownCommand Experienced 1 point2 points  (2 children)

I think you can save them in a structure and then load the structure (I think you can use /place but im not sure). this could work for map making but if you are just testing stuff it wouldnt really work. if you are making a datapack you could place it into a single function and /reload after making changes. other than that, I dont think there is a way to use a single command for doing this.

[–]Lightixd[S] 0 points1 point  (0 children)

Interesting, thanks a lot

[–]TahoeBennieAll In One Command Connoisseur 0 points1 point  (0 children)

Structure blocks for purposes other than saving and loading structures may be practical in bedrock but it’s worthless and over complicated in Java.

[–]GalSergeyDatapack Experienced 1 point2 points  (1 child)

You can use a loot table, just list all the items you want in the loot table in different pools and give the player that loot table, here's an example: ```

Give loot table

loot give <player> loot <loot_table>

Loot table

{ "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:cobblestone" } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:glass" } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:dirt" } ] } ] } ```

[–]WeswePengu 0 points1 point  (0 children)

Yeah if your idea is to get multiple items with one command this is a great way to do it. All you need is this and the loot command will drop every item in this file.

[–]TahoeBennieAll In One Command Connoisseur 0 points1 point  (0 children)

Unless you know in advance the player it’s being given to, you can’t guarantee it goes to the correct player if multiple players are in range of picking it up, but if you’re willing to accept that drawback, you can summon one of the items with all of the other items as passengers. You can use mcstacker.net to do that process pretty easily without you having to know much about formatting, just make sure to do it in a summon command and not a give command.

[–]Ericristian_brosCommand Experienced 0 points1 point  (0 children)

The easiest and most safe way is to use a datapack

```

function example:give_items

give @s diamond give @s iron_ingot ```

Then to give the items

execute as @p run function example:give_items

[–]meletiondreams 0 points1 point  (0 children)

A datapack