I did this before in 1.20.1 forge, however in neoforge it has changed.
this is the ol' 1.20.1 forge script that I need to convert to neoforge 1.21.1
ItemEvents.tooltip(event => {
event.addAdvanced(["createbb:cyanide"], (item, advanced, text) => {
text.add(1, [
Text.of('You should probably not consume this.').red()
])
if (!event.isShift()) {
text.add(2, [
Text.of('Hold ').gold(),
Text.of('[Shift] ').yellow(),
Text.of('to see description').gold()
])
} else if (event.isShift()) {
text.add(2, [
text.of('Can be combined with any food item.')
])
}
})
})

