//注册attribuet
let $RangedAttrubute = Java.loadClass('net.minecraft.world.entity.ai.attributes.RangedAttribute')
StartupEvents.registry('attribute', event => {
    event.createCustom('kubejs:pestilence', () => {
        return new $RangedAttrubute('attribute.name.kubejspestilence', 0, 0, 1000)
    })
    event.createCustom('kubejs:fire_damage', () => {
        return new $RangedAttrubute('attribute.name.kubejsfire_damage', 0, 0, 1000)
    })
})
ForgeModEvents.onEvent('net.minecraftforge.event.entity.EntityAttributeModificationEvent', event => {
    if (!event.has('player', 'kubejs:pestilence')) {
        event.add('player', 'kubejs:pestilence')
    }
    if (!event.has('player', 'kubejs:fire_damage')) {
        event.add('player', 'kubejs:fire_damage')
    }
    if (!event.has('player', 'attributeslib:creative_flight')) {
        event.add('player', 'attributeslib:creative_flight')
    }
    if (!event.has('player', 'tetra:draw_strength')) {
        event.add('player', 'tetra:draw_strength')
    }
})