// priority: 0

/**
 * @param {Internal.Item} item 
 */
const radioactiveFood = (item) => {
    item.foodProperties = (food) => {
        food.hunger(0);
        food.saturation(0);
        food.fastToEat(true);
        food.alwaysEdible();

        food.eaten((ctx) => {
            ctx.entity.kill();
        });

        food.effect("minecraft:instant_damage", 20 * 10, 2, 1);
    };
};

const pellets = [
    "mekanism:pellet_plutonium",
    "mekanism:pellet_polonium",
    "nuclearscience:plutonium239",
    "nuclearscience:polonium210",
    "kubejs:reinforced_polonium",
];

ItemEvents.modification((event) => {
    for (const pellet of pellets) {
        event.modify(pellet, radioactiveFood);
    }
});
