applyAttributeScaling
Applies attribute scaling to an item based on its level. Weapons get damage and attack speed bonuses. Armor gets armor, toughness, and knockback resistance bonuses. Note: Requires MC 1.21.2+ due to attribute naming changes (ARMOR vs GENERIC_ARMOR).
Parameters
itemStack
The item to apply attributes to
level
The item level (determines scaling)