I got this code running with some help, and now I got a question. The console.log spamms a LOT of times per second, so that code is executd a lot. Does that mean it has a big performance impact or is there some magic behind this that makes in barely noticable?
ForgeModEvents.onEvent('net.minecraftforge.client.event.RegisterColorHandlersEvent$Item', event => {
event.register((stack, tintIndex) => {
if (stack) {
if(stack.nbt) {
if(stack.nbt.color) {
console.log(tintIndex)
return '0x'+stack.nbt.color
} else {
return -1
}
} else {
return -1
}
} else {
return -1
}
}, Item.of('kubejs:gem'))
})```