J'ai une hache via cette commande (via les blocs de commande)
/give @p golden_axe 1 0 {display:{Name:"Thor's Axe",Lore:["The godliest","of the godliest."]},AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:40,Operation:0,UUIDMost:69160,UUIDLeast:521589},{AttributeName:"generic.followRange",Name:"generic.followRange",Amount:32,Operation:0,UUIDMost:99396,UUIDLeast:851924},{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:500,Operation:0,UUIDMost:76900,UUIDLeast:463228},{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:0.5,Operation:0,UUIDMost:34152,UUIDLeast:644098},{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:5,Operation:0,UUIDMost:85956,UUIDLeast:818955}],Unbreakable:1}
Cependant, mes intentions étaient de le mettre dans une commande de coffre invoqué. J'ai donc essayé ceci :
/setblock ~1 ~ ~ chest 0 replace {Items:[{golden_axe 0 1 {display:{Name:"Thor's Axe",Lore:["The godliest","of the godliest."]},AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:40,Operation:0,UUIDMost:69160,UUIDLeast:521589},{AttributeName:"generic.followRange",Name:"generic.followRange",Amount:32,Operation:0,UUIDMost:99396,UUIDLeast:851924},{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:500,Operation:0,UUIDMost:76900,UUIDLeast:463228},{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:0.5,Operation:0,UUIDMost:34152,UUIDLeast:644098},{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:5,Operation:0,UUIDMost:85956,UUIDLeast:818955}],Unbreakable:1}}]}
Cependant, j'obtiens ensuite une erreur JSON concernant les séparateurs :
[00:04:05] Data tag parsing failed: Unable to locate name/value separator for string: golden_axe {display:{Name:"Thor's Axe",Lore:["The godliest","of the godliest."]},AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:40,Operation:0,UUIDMost:69160,UUIDLeast:521589},{AttributeName:"generic.followRange",Name:"generic.followRange",Amount:32,Operation:0,UUIDMost:99396,UUIDLeast:851924},{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:500,Operation:0,UUIDMost:76900,UUIDLeast:463228},{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:0.5,Operation:0,UUIDMost:34152,UUIDLeast:644098},{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:5,Operation:0,UUIDMost:85956,UUIDLeast:818955}],Unbreakable:1}
Maintenant, je suis perplexe. J'ai trouvé quelque chose comme celui ci-dessus ; mais cela a fonctionné - mais SANS les attributs du client.
Y a-t-il un moyen de mettre la hache :
"{golden_axe {display:{Name:"Thor's Axe",Lore:["The godliest","of the godliest."]},AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:40,Operation:0,UUIDMost:69160,UUIDLeast:521589},{AttributeName:"generic.followRange",Name:"generic.followRange",Amount:32,Operation:0,UUIDMost:99396,UUIDLeast:851924},{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:500,Operation:0,UUIDMost:76900,UUIDLeast:463228},{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:0.5,Operation:0,UUIDMost:34152,UUIDLeast:644098},{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:5,Operation:0,UUIDMost:85956,UUIDLeast:818955}],Unbreakable:1}}]"
Dans le coffre ? (commande d'invocation ou setblock)