1

Name items in a command block with multiple commands in 1.13+ versions

Subisso 4/25/20 5:34 pm history
88
Hi,
I'm trying to make a command block that gives me more item.
I've found this formula in the web:


summon falling_block ~ ~1 ~ {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 commandBlockOutput false'},

{id:command_block_minecart,Command:'data merge block ~ ~-2 ~ {auto:0}'},


{id:command_block_minecart,Command:'PUT FIRST COMMAND HERE'},

{id:command_block_minecart,Command:'PUT SECOND COMMAND HERE'},


{id:command_block_minecart,Command:'setblock ~ ~1 ~ command_block{auto:1,Command:"fill ~ ~ ~ ~ ~-2 ~ air"}'},

{id:command_block_minecart,Command:'kill @e[​type=command_block_minecart,distance=..1]'}]}]}]}


It works as long as I don't name the items.

Making an example, if I execute this command, everything works.

give @p diamond_pickaxe{Unbreakable:1,display:{Name:"\"Lucky Pickaxe\"",Lore:["Hello"]},Enchantments:[{id:sharpness,lvl:7},{id:efficiency,lvl:12},{id:fortune,lvl:12},{id:mending,lvl:12}]} 1

If I execute this command it works as well. (Without displaying name and lore of the tool)


summon falling_block ~ ~1 ~ {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 commandBlockOutput false'},

{id:command_block_minecart,Command:'data merge block ~ ~-2 ~ {auto:0}'},


{id:command_block_minecart,Command:'/give @p diamond_pickaxe{Unbreakable:1,Enchantments:[{id:sharpness,lvl:7},{id:efficiency,lvl:12},{id:fortune,lvl:12},{id:mending,lvl:12}]} 1'},


{id:command_block_minecart,Command:'setblock ~ ~1 ~ command_block{auto:1,Command:"fill ~ ~ ~ ~ ~-2 ~ air"}'},

{id:command_block_minecart,Command:'kill @e[​type=command_block_minecart,distance=..1]'}]}]}]}

If I try to execute this command it doesn't work. (Adding the name and lore that should be displayed)



summon falling_block ~ ~1 ~ {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 commandBlockOutput false'},

{id:command_block_minecart,Command:'data merge block ~ ~-2 ~ {auto:0}'},




{id:command_block_minecart,Command:'give @p diamond_pickaxe{Unbreakable:1,display:{Name:"\"Lucky Pickaxe\"",Lore:["Hello"]},Enchantments:[{id:sharpness,lvl:7},{id:efficiency,lvl:12},{id:fortune,lvl:12},{id:mending,lvl:12}]} 1'},




{id:command_block_minecart,Command:'setblock ~ ~1 ~ command_block{auto:1,Command:"fill ~ ~ ~ ~ ~-2 ~ air"}'},

{id:command_block_minecart,Command:'kill @e[​type=command_block_minecart,distance=..1]'}]}]}]}

I tried changing the syntax of display:{Name:"\"Lucky Pickaxe\"",Lore:["Hello"]}
I used this formula:

display:{Name:"{\"text\":\"Lucky Pickaxe\"}"}

It does work when I use a simple command /give, but it doesn't when I put it in the "summon falling_block..." command.

I know that the problem is the name of the objects because if I dont give them names everything works perfectly.
My question is: why doesn't it work in the "summon falling_block..." command while it does in the "/give" command?
And how can I make it work?
Posted by
Subisso
Level 1 : New Explorer
0

  Have something to say?

JoinSign in

Welcome