#How can I change mod item attributes?

2 messages · Page 1 of 1 (latest)

scenic gust
#

I'm trying to modify item attributes like damage and attack speed using code from the wiki. It works for vanilla items, but doesn't affect modded ones.

ItemEvents.modification(event => {
  event.modify('medievalweapons:netherite_long_sword', item => {
    item.attackDamage = 12.0;
    item.attackSpeed = 1.2;
  }) // doesn't
  event.modify('minecraft:netherite_sword', item => {
    item.attackDamage = 12.0;
    item.attackSpeed = 1.2;
  }) // works
})
rigid patrolBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!