想把纸的命名设置到头颅的SkullOwner上复制代码@e[type=item,tag=material2,sort=nearest,limit=1]是这个头颅
@s 是纸
本来我想得到 命名的头颅
结果却给我了 {"text":"命名"}的头颅
感觉是nbt路径的问题
Item.tag.display.Name
wiki上是这么说的
https://minecraft-zh.gamepedia.c ... T.E8.B7.AF.E5.BE.84
试了几次还是不知道怎么处理
请各位大佬帮帮我
- data modify entity @e[type=item,tag=material2,sort=nearest,limit=1] Item.tag.SkullOwner set from entity @s Item.tag.display.Name"A cool name[]"
@s 是纸
本来我想得到 命名的头颅
结果却给我了 {"text":"命名"}的头颅
感觉是nbt路径的问题
Item.tag.display.Name
wiki上是这么说的
| 命名节点 | 名称,名称是纯文本或转义后的字符串。 | 在上个标签中选择名为名称的子标签。 | A collection of tags; no more elements than the previous tag collection. May be nothing. | VillagerData | 选择子标签VillagerData。 |
| "A cool name[]" | 选择子标签A cool name[]。 |
https://minecraft-zh.gamepedia.c ... T.E8.B7.AF.E5.BE.84
试了几次还是不知道怎么处理
请各位大佬帮帮我
没错啊 你要搞清楚SkullOwner是字符串
Name是json
能不出问题才怪呢
当然 不是没有办法 很麻烦就是了(
Name是json
能不出问题才怪呢
当然 不是没有办法 很麻烦就是了(
Jokey_钥匙 发表于 2020-2-21 15:06
没错啊 你要搞清楚SkullOwner是字符串
Name是json
能不出问题才怪呢
没有用路径直接解决的方法吗
如果你愿意用书与笔的 title 代替的话
https://github.com/ruhuasiyu/Cra ... datapacks/CraftHead
https://github.com/ruhuasiyu/Cra ... datapacks/CraftHead