So a mod by the name of tryashtar gave me this command to make it so when I break a minecart with canplaceon tags, it would drop the same minecart with canplaceon tags. It did nothing.
Please tell me what I am doing wrong or mark this as a bug.
What I am Doing:
Getting a minecart with the canplaceon tag for Detector Rails, Activator Rails, Powered Rails, and Regular Rails.
Executing the command
/execute as @e[type=item,nbt={Item:{id:"minecraft:minecart"}}] run data merge entity @s {Item:{tag:{CanPlaceOn:["minecraft:rail","minecraft:powered_rail","minecraft:detector_rail","minecraft:activator_rail"]}}}
Placing down the minecart from step 1.
Breaking the minecart to see if the command works.
Seeing the minecart drop another non-tagged minecart that doesn't work.
Please fix this. Thank you.
Good grief man – you run that command after breaking the minecart, so the dropped item gets the necessary tags.