import { system, world } from "@minecraft/server";

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:evil_ham") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s health_boost 8 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:gilded_apple") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s regeneration 30 4");
            player.runCommandAsync("effect @s absorption 240 6");
            player.runCommandAsync("effect @s health_boost 120 4");
            player.runCommandAsync("effect @s resistance 300 3");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_nether_wart") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s fatal_poison 20 1");
            player.runCommandAsync("effect @s strength 20 2");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_nether_wart_amplified") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s fatal_poison 20 2");
            player.runCommandAsync("effect @s strength 20 4");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_nether_wart_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s fatal_poison 40 1");
            player.runCommandAsync("effect @s strength 40 2");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_fatal_poison") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s fatal_poison 30 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_fatal_poison_amplified") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s fatal_poison 20 2");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_fatal_poison_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s fatal_poison 60 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_absorption_amplified") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s absorption 60 3");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_hunger") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s hunger 20 20");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_hunger_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s hunger 40 20");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_hunger_amplified") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s hunger 20 40");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_resistance") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s resistance 30 4");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_resistance_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s resistance 60 4");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_resistance_amplified") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s resistance 30 5");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_wither") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s wither 30 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_wither_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s wither 60 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_wither_amplified") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s wither 20 2");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_health_boost") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s health_boost 180 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_health_boost_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s health_boost 360 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_health_boost_amplified") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s health_boost 90 3");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_absorption") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s absorption 120 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_absorption_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s absorption 360 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_blindness") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s blindness 20 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_blindness_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s blindness 60 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_darkness") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s darkness 20 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_darkness_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s darkness 60 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_soul_amplified") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s levitation 4 5");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_soul") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s levitation 8 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_soul_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s levitation 16 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_nausea") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s nausea 30 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_nausea_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s nausea 90 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_anomalous_amplified") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s mining_fatigue 20 3");
            player.runCommandAsync("effect @s resistance 20 3");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_anomalous") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s mining_fatigue 20 1");
            player.runCommandAsync("effect @s resistance 20 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_anomalous_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s mining_fatigue 40 1");
            player.runCommandAsync("effect @s resistance 40 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_mining_fatigue_amplified") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s mining_fatigue 20 3");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_mining_fatigue") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s mining_fatigue 20 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_mining_fatigue_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s mining_fatigue 40 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_crimson_amplified") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s weakness 20 3");
            player.runCommandAsync("effect @s health_boost 20 3");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_crimson") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s weakness 20 1");
            player.runCommandAsync("effect @s health_boost 20 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_crimson_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s weakness 40 1");
            player.runCommandAsync("effect @s health_boost 40 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_withered_amplified") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s darkness 20 1");
            player.runCommandAsync("effect @s absorption 20 4");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_withered") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s darkness 20 1");
            player.runCommandAsync("effect @s absorption 20 2");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_withered_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s darkness 40 1");
            player.runCommandAsync("effect @s absorption 40 2");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_warped_amplified") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s hunger 20 40");
            player.runCommandAsync("effect @s haste 20 3");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_warped") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s hunger 20 20");
            player.runCommandAsync("effect @s haste 20 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:potion_warped_extended_time") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s hunger 40 20");
            player.runCommandAsync("effect @s haste 40 1");
            player.runCommandAsync("give @s[m=!c] glass_bottle 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:beast_bacon") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s nausea 5 1");
            player.runCommandAsync("effect @s health_boost 10 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:cooked_beast_bacon") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s health_boost 10 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:creepeg_porkchop") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s haste 10 1");
            player.runCommandAsync("effect @s weakness 5 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:cooked_creepeg_porkchop") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s haste 10 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:creepig_ham") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s night_vision 10 1");
            player.runCommandAsync("effect @s poison 5 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:cooked_creepig_ham") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s night_vision 10 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:crimson_fungus_stew") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s weakness 8 1");
            player.runCommandAsync("effect @s health_boost 8 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:withered_fungus_stew") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s blindness 8 1");
			player.runCommandAsync("effect @s absorption 8 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:anomalous_fungus_stew") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s mining_fatigue 8 1");
            player.runCommandAsync("effect @s resistance 8 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:soul_fungus_stew") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s nausea 15 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:nether_wart_stew") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s fatal_poison 8 1");
			player.runCommandAsync("effect @s strength 8 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:cooked_hoglin_ribeye") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s strength 5 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:hoglin_ribeye") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s strength 5 1");
            player.runCommandAsync("effect @s slowness 3 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:taaffeite_apple") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s instant_health 1 1");
            player.runCommandAsync("effect @s health_boost 90 1");
            player.runCommandAsync("effect @s regeneration 10 2");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:old_cooked_porkchop") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s regeneration 6 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:old_porkchop") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s regeneration 6 1");
            player.runCommandAsync("effect @s hunger 10 2");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:cooked_ham") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s regeneration 6 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:ham") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s regeneration 6 1");
            player.runCommandAsync("effect @s hunger 10 2");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:rotten_desert_flesh") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s hunger 35 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:rotten_oceanic_flesh") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s hunger 30 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:ruby_apple") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s fire_resistance 240 1");
            player.runCommandAsync("effect @s regeneration 30 1");
            player.runCommandAsync("effect @s saturation 10 1");
            player.runCommandAsync("effect @s slow_falling 15 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:taaffeite_melon") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s jump_boost 45 1");
            player.runCommandAsync("effect @s water_breathing 30 2");
            player.runCommandAsync("effect @s saturation 10 1");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:warped_fungus_stew") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s haste 8 1");
            player.runCommandAsync("effect @s hunger 8 20");
        });
    }

    return;
});

world.afterEvents.itemCompleteUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:enchanted_ruby_apple") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("effect @s fire_resistance 240 1");
            player.runCommandAsync("effect @s regeneration 60 1");
            player.runCommandAsync("effect @s saturation 10 1");
            player.runCommandAsync("effect @s slow_falling 60 1");
            player.runCommandAsync("effect @s strength 15 2");
        });
    }

    return;
});

//Soul Iron Golem Spawn Egg by Player
world.afterEvents.itemUse.subscribe(data => {
    if (data.itemStack.typeId == "old_nether:soul_iron_golem_spawn_egg_by_player") {
        system.run(() => {
            const player = data.source;
            player.runCommandAsync("function soul_iron_golem_by_player");
        });
    }

    return;
});  