double attackDmg = stack.getComponents()
.getOrDefault(DataComponentTypes.ATTRIBUTE_MODIFIERS, AttributeModifiersComponent.DEFAULT)
.modifiers().stream()
.filter(entry -> entry.attribute().matchesId(Item.BASE_ATTACK_DAMAGE_MODIFIER_ID))
.map(entry -> entry.modifier().value())
.findFirst()
.orElse(0.0); // idk, some other val
For the love of Mojank, is this really how we're supposed to access the damage a weapon/item deals as of 1.21.3?
It used to be as simple as swordItem.getMaterial().getAttackDamage() for example 