// priority: 1000
StartupEvents.registry('minecraft:item', event => {
    event.create('kubejs:dark_witness_memory', 'basic')
        .texture('kubejs:item/curios/dark_witness_memory')
        .maxStackSize(1)
        .attachCapability(CuriosCapabilityBuilder.CURIOS.itemStack()
            .canEquip(() => true)
            .canUnequip(() => true)
            .dynamicAttribute(ctx => {
                const item = ctx.getStack()
                const nbt = item.getOrCreateTag()
                ctx.modify('minecraft:generic.armor', 'DarkWitnessMemoryArmorAddition', FloorFix(nbt.getFloat('attriValue'), 2), 'addition')
            })
        )
        .tag('curios:memory')

    event.create('kubejs:reunion_memory', 'basic')
        .texture('kubejs:item/curios/reunion_memory')
        .maxStackSize(1)
        .attachCapability(CuriosCapabilityBuilder.CURIOS.itemStack()
            .canEquip(() => true)
            .canUnequip(() => true)
            .dynamicAttribute(ctx => {
                const item = ctx.getStack()
                const nbt = item.getOrCreateTag()
                ctx.modify('attributeslib:experience_gained', 'ReunionMemoryExperienceMultiplier', FloorFix(nbt.getFloat('attriValue'), 2), 'addition')
            })
        )
        .tag('curios:memory')

    event.create('kubejs:fear_memory', 'basic')
        .texture('kubejs:item/curios/fear_memory')
        .maxStackSize(1)
        .attachCapability(CuriosCapabilityBuilder.CURIOS.itemStack()
            .canEquip(() => true)
            .canUnequip(() => true)
            .dynamicAttribute(ctx => {
                const item = ctx.getStack()
                const nbt = item.getOrCreateTag()
                ctx.modify('attributeslib:crit_damage', 'FearMemoryCritDamageAddition', FloorFix(nbt.getFloat('attriValue'), 2), 'addition')
            })
        )
        .tag('curios:memory')

    event.create('kubejs:cheat_death_memory', 'basic')
        .texture('kubejs:item/curios/cheat_death_memory')
        .maxStackSize(1)
        .attachCapability(CuriosCapabilityBuilder.CURIOS.itemStack()
            .canEquip(() => true)
            .canUnequip(() => true)
            .dynamicAttribute(ctx => {
                const item = ctx.getStack()
                const nbt = item.getOrCreateTag()
                ctx.modify('minecraft:generic.luck', 'CheatDeathMemoryLuckAddition', FloorFix(nbt.getFloat('attriValue'), 2), 'addition')
            })
        )
        .tag('curios:memory')

    event.create('kubejs:desperate_memory', 'basic')
        .texture('kubejs:item/curios/desperate_memory')
        .maxStackSize(1)
        .attachCapability(CuriosCapabilityBuilder.CURIOS.itemStack()
            .canEquip(() => true)
            .canUnequip(() => true)
            .dynamicAttribute(ctx => {
                const item = ctx.getStack()
                const nbt = item.getOrCreateTag()
                ctx.modify('minecraft:generic.attack_damage', 'DesperateMemoryAttackDamageAddition', FloorFix(nbt.getFloat('attriValue'), 2), 'addition')
            })
        )
        .tag('curios:memory')
})