let $Attributes = Java.loadClass('net.minecraft.world.entity.ai.attributes.Attributes')
let $AttributeModifier = Java.loadClass('net.minecraft.world.entity.ai.attributes.AttributeModifier')

ForgeEvents.onEvent('net.minecraftforge.event.ItemAttributeModifierEvent', event => {
    if (event.itemStack.id == 'deepnether:deep_nether' && event.slotType == 'mainhand') {
        //Inputting a ResourceLocation or a string of an attribute ID also works, but I just use the direct attribute
        event.addModifier($Attributes.ATTACK_DAMAGE, new $AttributeModifier(UUID.fromString('8de60aa9-1d4b-459f-b075-48e1c37523ce'), 'Weapon modifier', 1, 'multiply_total'))
    }

    if (event.itemStack.id == "minecraft:stone_hoe" && event.slotType == 'mainhand') {
        event.addModifier(
            $Attributes.ATTACK_DAMAGE,
            new $AttributeModifier(
                UUID.fromString('1a775a33-2e51-46f1-b6d3-1f487a5279fb'),
                'Weapon modifier',
                1.5,
                'addition'
            )
        );
    }
    if (event.itemStack.id == "minecraft:iron_hoe" && event.slotType == 'mainhand') {
        event.addModifier(
            $Attributes.ATTACK_DAMAGE,
            new $AttributeModifier(
                UUID.fromString('109f004e-1ba6-4ae8-be8d-13f6275f01ca'),
                'Weapon modifier',
                2.5,
                'addition'
            )
        );
    }
    if (event.itemStack.id == "minecraft:diamond_hoe" && event.slotType == 'mainhand') {
        event.addModifier(
            $Attributes.ATTACK_DAMAGE,
            new $AttributeModifier(
                UUID.fromString('b5bee99e-9c47-4315-a06c-17e05ff54f2c'),
                'Weapon modifier',
                3.5,
                'addition'
            )
        );
    }
    if (event.itemStack.id == "minecraft:netherite_hoe" && event.slotType == 'mainhand') {
        event.addModifier(
            $Attributes.ATTACK_DAMAGE,
            new $AttributeModifier(
                UUID.fromString('2f92eff5-61bc-4fd8-b921-4a617bd4c5ca'),
                'Weapon modifier',
                4.5,
                'addition'
            )
        );
    }
    if (event.itemStack.id == "minecraft:stone_axe" && event.slotType == 'mainhand') {
        event.addModifier(
            $Attributes.ATTACK_DAMAGE,
            new $AttributeModifier(
                UUID.fromString('913daf73-08a4-4d08-b205-8436b76a671f'),
                'Weapon modifier',
                -2,
                'addition'
            )
        );
    }
    if (event.itemStack.id == "minecraft:iron_axe" && event.slotType == 'mainhand') {
        event.addModifier(
            $Attributes.ATTACK_DAMAGE,
            new $AttributeModifier(
                UUID.fromString('913daf73-08a4-4d08-b205-8436b76a671f'),
                'Weapon modifier',
                -1,
                'addition'
            )
        );
    }
});