Interface ModifyItemAttributeModifiersCallback

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ModifyItemAttributeModifiersCallback
Stack-aware attribute modifier callback for foreign items. Instead of using Mixin to change attribute modifiers in items not in your mod, you can use this event instead, either checking the Item itself or using a tag. This event provides you with a guaranteed mutable map you can put attribute modifiers in. Do not use for your own Item classes; see FabricItem.getAttributeModifiers(net.minecraft.item.ItemStack, net.minecraft.entity.EquipmentSlot) instead. For example, the following code modifies a Diamond Helmet to give you five extra hearts when wearing.
 
 ModifyItemAttributeModifiersCallback.EVENT.register((stack, slot, attributeModifiers) -> {
 	if (stack.isOf(Items.DIAMOND_HELMET) && slot.getEntitySlotId() == HEAD_SLOT_ID) {
 		attributeModifiers.put(EntityAttributes.GENERIC_MAX_HEALTH, MODIFIER);
 	}
 });