//in startup_scripts
ItemEvents.modification(event => {
event.modify('minecraft:golden_carrot', item => {
item.food = {
alwaysEdible: true
}
})
})
This works, but it sets all the other parts (consumption time, saturation, etc) to 0. I tried making a copy of the food component but couldn't figure out the syntax. I could set the other components here to the defaults and that would also work but it would make more sense to make a copy