-
Bug
-
Resolution: Cannot Reproduce
-
None
-
1.20.0, 1.20.10, 1.20.12 Hotfix
-
None
-
Survival
-
Unconfirmed
-
Multiple
Specifically, this happens in the "on_consume" event of the "minecraft:food" component of the custom items, before 1.20.0, nothing happened, but now in this version, whether a mob or a player, the game crashes when executing the event. No matter what add-on or item it is, if "on_consume" is executed, the game crashes. (Also as an addiction, the custom items while doing the eating animation, its particle is not consistent with the texture of the item and puts any of the base game, this problem has been going on for versions prior to 1.20.0.). It happens on windows and mobiles, as I have tested.
I have tried several workarounds, like changing the format version, adapting the commands to a function, looking at the latest documentation and setting it up the way it is, but nothing has worked.
[EDIT]
Testing, changing things and consulting with more add-on makers, we came to two possible conclusions and "solutions" to the problem that is occurring. One of them is the use of the "target", in the "on_consume" by default the target is "self" but, testing several times, it seems that the lack of this in your code causes the crash of the game, then possibly it is advisable to leave the "target": "self" in the "on_consume", also another conclusion is that directly when "on_consume" happens, no matter what contains the event, just by calling this event, the game crashes (If it doesn't have target). Also another conclusion that puts me in the situation, I use the experimental called "API Beta" and also my "manifest.json" has the necessary modules for it, when testing again with the changes of the target, it works only in the player almost most of the time without crashing the game, but it seems that in the mob's it continues to fail.
[EDIT2]
In dedicated servers, this happens and no matter what changes you try to make it crashes the server when executing "on_consume".