How to Reproduce
Execute the following command
/loot give @s loot {pools:[{rolls:1,entries:[{type:"item",name:"stone",functions:[{function:"set_name",entity:"this",name:["test",{selector:"@s"}]}]}]}]}
Expected Behaviour
Parse successfully since it's a valid json.
Observed Behaviour
Can't insert TAG_Compound into list of TAG_String
Attachments
Comments 5
Removing this allows the command to be completed. What is the purpose of including this? There's a warning that the name field requires a string, so it would be expected that only a string can be parsed.
,{selector:"@s"}
No, it requires a text json component. it can be string, object, or array, and in array you can mix three of these. the issue is you can't do that unlike read from a file.
Thank you for your report!
After consideration, the issue is being closed as Working as Intended.
Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.
Full Version History – Snapshot Version History – The official Minecraft feedback site
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
What are you trying to do with this command?