Open MrNovado opened 2 years ago
Can confirm this is still broken.
This is a design problem since modified items do not have any itemBuilder
, where foodBuilder.eaten
is accessed when player eats through it.
For a workaround, use:
ItemEvents.foodEaten("minecraft:charcoal", event => {
})
Which will have the same behavior as setting in foodBuilder
. We might need to consider separating things in builder to mixins.
Minecraft Version
1.19.2
KubeJS Version
1902.6.0-build.114
Rhino Version
1902.2.1-build.257
Architectury Version
6.3.49
Forge/Fabric Version
Forge 43.1.52
Describe your issue
I'm playing with the food builder and trying to make inedible stuff into edibles with added effects, but I noticed
eaten
event is only triggered on newly registered items, eg:But on
modification
event, while food-builder is available and you can use it to change most properties just fine, theeaten
event handler would not be triggered:Also, I believe it's the same for prev. versions of kjs (at least for 1.18.2 [obv. with different syntax]).
Crash report/logs
No response