mojira.dev
MC-57840

Unbreakable Sword with damage value shows missing texture

When making the sword by code shown below, it has no texture shown.

give @p minecraft:diamond_sword 1 40 {display:{Name:matrix sword,color:9046024,Lore:["Matrix","Staff Weapon,"]},Unbreakable:1,ench:[{id:16,lvl:10},{id:17,lvl:10},{id:18,lvl:10},{id:19,lvl:10},{id:20,lvl:10},{id:21,lvl:10},{id:34,lvl:10}],AttributeModifiers:[{AttributeName:"generic.attackDamage",Name:"jksdf",UUIDLeast: -12312312, UUIDMost: 12312312, Operation:0 ,Amount: 4000000}]}

Linked issues

Attachments

Comments 8

Confirmed for 14w25b

It's the combination of a damage value and the Unbreakable tag. While this worked before, it didn't accomplish anything, because Unbreakable hid the durability bar, or ignored the damage value / set it to the maximum anyway.

give @p minecraft:diamond_sword 1 0 {display:{Name:matrix sword,color:9046024,Lore:["Matrix","Staff Weapon,"]},Unbreakable:1,ench:[{id:16,lvl:10},{id:17,lvl:10},{id:18,lvl:10},{id:19,lvl:10},{id:20,lvl:10},{id:21,lvl:10},{id:34,lvl:10}],AttributeModifiers:[{AttributeName:"generic.attackDamage",Name:"jksdf",UUIDLeast: -12312312, UUIDMost: 12312312, Operation:0 ,Amount: 4000000}]}

works just fine. Just change the 40 to 0.

If you omit the Unbreakable tag it's working:

give @p minecraft:diamond_sword 1 0 {display:{Name:matrix sword,color:9046024,Lore:["Matrix","Staff Weapon,"]},ench:[{id:16,lvl:10},{id:17,lvl:10},{id:18,lvl:10},{id:19,lvl:10},{id:20,lvl:10},{id:21,lvl:10},{id:34,lvl:10}],AttributeModifiers:[{AttributeName:"generic.attackDamage",Name:"jksdf",UUIDLeast: -12312312, UUIDMost: 12312312, Operation:0 ,Amount: 4000000}]}

It works fine with the Unbreakable tag too, as long as the damage value is 0. It's only if the damage value is non-zero that the texture fails, and I don't know why you'd want a damaged unbreakable item anyway.

Sounds like it works as intended, in that case. Is there any reason why the damage value needs to be non-zero if it's unbreakable?

The code that torabi gave fixed the issue and it works .. but at some point it had to be "1 40" in order for it to work i could be wrong .. but either way it work if u use "1 0" as per the code that Torabi provided

Works as intended, then. Use a damage value of 0 for an unbreakable sword.

Warren Liddell

(Unassigned)

Confirmed

Minecraft 14w25a, Minecraft 14w25b

Retrieved