ForgeEvents.onEvent('net.minecraftforge.event.entity.living.LivingEquipmentChangeEvent', e => {
    let { entity, from, to, slot } = e;
    global.EquipmentChange(e);
})
/** 任意实体 任意槽位附魔修正
 * ForgeEvents无法被热重载，但是可以跟global对接
 * 用指令/kubejs reload startup_scripts 可对global内代码进行热重载
 * @param {Internal.LivingEquipmentChangeEvent} e 
 */
global.EquipmentChange = e => {
    let { to } = e;
    // 此处添加附魔
    let enchantments = [
        'l2complements:void_touch'
    ];
    enchantments.forEach(enc => {
        to.getEnchantmentTags().removeIf(
            a => a.asString.includes(enc));
    })
}