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

system.beforeEvents.startup.subscribe(initEvent => {
    initEvent.itemComponentRegistry.registerCustomComponent('rustic:olives_on_cosume', {
      onConsume: e =>  {
        const source = e.source
        source.addEffect('nausea', 200);
      }
    });
});