Arqade Asked by Oakrest on June 5, 2021
Im trying to clone the inventory of one named storage to another.
I first tried finding a way to clone the inventory of a chest.
e.g:
execute as @e run data modify block[type=chest,name=input]...
But that didn’t work because i couldn’t because the block syntax only accepts xyz coordinates and not nbt data.
So i tried to do it with a chest Minecart using the data modify command which allow me to find my item through nbt selectors.
execute as @e run data modify entity @s[type=minecraft:chest_minecart,name=output] Items set from entity @s[type=minecraft:chest_minecart,name=input] Inventory
However for one reason or another I get no response at all.
Did I write this right or is there another way to do this.
What your original command does in Plain English:
Tell all entities to, if they are a chest minecart named
output
, modify theirItems
tag to itself, only if they are also namedInput
.
That doesn't make sense. An entity can't be named both input
and output
at the same time. And, because you're using @s
for both selectors in the /data
command, the chest minecarts would be referring to themselves only to set the data, not any of the other chest minecarts.
So to fix this, try this approach:
execute as @e[type=chest_minecart,name=output] run data modify entity @s Items set from entity @e[type=chest_minecart,name=input,limit=1] Items
Correct answer by ExpertCoder14 on June 5, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP