I'm currently balancing some overpowered weapons and armors in a modpack I'm making, but can't quite figure out how to go about this. I understand how to get the item data with /ct hand attributes, and the documentation says to use this method:
// IItemStack.withAttributeModifier(attribute as Attribute, name as string, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot, preserveDefaults as boolean) as IItemStack
myIItemStack.withAttributeModifier(<attribute:minecraft:generic.attack_damage>, "Extra Power", 10, AttributeOperation.ADDITION, [<constant:minecraft:equipmentslot:chest>], true);
But I can't get it to work. It throws the following error:
[10:28:01.738][ERROR]: dogchanges.zs:125:0: dogchanges.zs:125:0: No compatible methods found!