mojira.dev
MC-181719

Can't add custom attributes to items.

In the latest snapshots, I can't add custom attributes to items. For example, if I type in the command: "/give @p wooden_sword{AttributeModifiers:[

{AttributeName:generic.armor,Amount:5,Operation:0,UUIDLeast:120632100,UUIDMost:99,Slot:mainhand,Name:generic.armor}

]}" I get a wooden sword that gives me + 5 defence when in the main hand.

However, if I type in this command in the latest snapshots, it doesn't work.
I have included images of it working on 1.15.2 and not working in 20w18a.

Edit: it is possible to transfer the items from version to version, the command does not work though.

Attachments

Comments 1

As of 20w12a, UUIDs stored in NBT are now represented as an array of four integers like for example

{UUID:[I;1498693494,1027158888,1898994005,860320107]}

Along with that a couple of fields have been renamed:

  • OwnerUUID of tamed animals, area effect clouds, evoker fangs and projectiles is now simply Owner

  • TrustedUUIDs of foxes is now Trusted

  • target_uuid of conduits is now Target

And also introduced in 20w14a, attributes have been changed (except for generic.armor)

  • generic.maxHealth -> generic.max_health

  • zombie.spawnReinforcements -> zombie.spawn_reinforcements

  • horse.jumpStrength -> horse.jump_strength

  • generic.followRange -> generic.follow_range

  • generic.knockbackResistance -> generic.knockback_resistance

  • generic.movementSpeed -> generic.movement_speed

  • generic.flyingSpeed -> generic.flying_speed

  • generic.attackDamage -> generic.attack_damage

  • generic.attackKnockback -> generic.attack_knockback

  • generic.attackSpeed -> generic.attack_speed

  • generic.armorToughness -> generic.armor_toughness

John Johnathon

(Unassigned)

Unconfirmed

(Unassigned)

20w18a

Retrieved