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

world.beforeEvents.worldInitialize.subscribe(e => {
    e.itemComponentRegistry.registerCustomComponent('mc_ark:steam_berries', { 
        onConsume({ itemStack, source }) {
            // Duración de 4 segundos (80 ticks)
            const duration = 4 * 20;
            source.addEffect('speed', duration, {
                showParticles: false,
                amplifier: 1
            });
        }
    });
});