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".
Attachments
Comments 11
All right, I've already put it.
Requires the experimentals: "Holiday Creator Features, Custom Biomes and Beta APIs".
I have put a version of the add-on with the entity that appears in the test video and the textures. In case it is necessary.
For the entity to execute the eat event, you put this command: "/event entity @e[type=piglin_brute] ha:start_regenerate". You may need to put it more than once.
In follow up to this, the addon Stratβs Food Expansion has also caused my Bedrock Dedicated Server to crash but it appears as if itβs only foods that apply potion effects when the potion effect takes effect. There is a food that has a chance to give strength in his addon and the server only crashes randomly when eating that food. Additionally, when eating the frozen foods from the Frost and bum_crops addons, the server crashes every time due to the potion effects. The issue seems to be directly related to potion effects.
In 1.20.10/12,the game will crash when this map has a gametest script.If your map doesn't has script,the game will not crash
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response.
Could you please attach a functional addon with which the issue can be observed?
This ticket will automatically reopen when you reply.
Quick Links:
π Issue Guidelines β π¬ Mojang Support β π Project Summary β π§ Suggestions β π Minecraft Wiki