Seems conflict with another mod Mantle
artoriuspendragon opened this issue · 1 comments
Minecraft Version
1.20.1
KubeJS Version
2001.6.5-build.16
Rhino Version
2001.2.3-build.6
Architectury Version
9.2.14
Forge/Fabric Version
Forge 47.4.0
Describe your issue
i just add one script below to change item's foodProperties,then install Mantle,the game will crash with error report,i tried to remove other mods to make sure the crash comes from the conflict with Mantle
error report message
[22:11:30] [ERROR] ! foods_init.js#550: Error in 'ItemEvents.modification': Cannot convert ArrowFunction (1) => {...} to net.minecraft.world.food.FoodProperties [22:11:30] [ERROR] ! …rhino.EvaluatorException: Cannot convert ArrowFunction (1) => {...} to net.minecraft.world.food.FoodProperties (startup_scripts:foods_init.js#550)
kube.js code
ItemEvents.modification(event => { let food_bunch = [ 'fruitstack:corpse' ] food_bunch.forEach(i => { event.modify(i, item => { item.foodProperties = food => { food.hunger(0) food.saturation(0) } }) }) })
i try to analyze the code from mantle ,find out Mantle seems to disable mixin by food properties (source code) ,is there anyway to make my script run successfully?
Crash report/logs
No response
See duplicate issue #1010, for discussion about lack of a solution