Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event "onAte" does not work for some custom food. #1088

Closed
HeliosPe opened this issue Feb 14, 2023 · 0 comments · Fixed by #1107
Closed

Event "onAte" does not work for some custom food. #1088

HeliosPe opened this issue Feb 14, 2023 · 0 comments · Fixed by #1107
Labels
bug Related to software malfunction priority: high Needs prompt action
Milestone

Comments

@HeliosPe
Copy link

Exceptions module

ScriptEngine

Operating System

Windows 11

LiteLoader version

2.9.0

BDS version

1.19.51

What happened?

Event "onAte" does not work for custom food with "format_version": "1.16.100". But there are not such problems for food with "format_version" earlier then 1.16.100.

For experiment I changed the "format_version" to 1.16.0, which has broken some mechanics, but after eating it, it triggered the "onAte" event.

I expected the onAte event to be triggered after eating the custom item with "format_version": "1.16.100".

Here is the code of my custom item:

{ "format_version": "1.16.100", "minecraft:item": { "description": { "identifier": "girasolia:cup_of_tea_blue_orchid", "category": "equipment" }, "components": { "minecraft:creative_category": { "parent": "itemGroup.name.cookedFood" }, "minecraft:max_stack_size": 16, "minecraft:use_duration": 1.5, "minecraft:use_animation": "drink", "minecraft:food": { "nutrition": 6, "saturation_modifier": "poor", "can_always_eat": true, "using_converts_to": "girasolia:empty_cup" }, "minecraft:icon": { "texture": "girasolia.cup_of_blue_drink" }, "minecraft:block_placer": { "block": "girasolia:tea_blue_orchid_cup", "use_block_description": true } } } }

Steps to reproduce?

  1. Create via behavior pack a custom item with "format_version": "1.16.100".
  2. Add to the custom item "food" component to make it a food item.
  3. Add the add-on to the server.
  4. Add a listener for onAte event, and an output to check if it was ever triggered.
  5. Try to eat the custom food item.

Relevant log output

No response

Plugin list

21:53:22 INFO [Server] Список плагинов [9]
21:53:22 INFO [Server] - LLMoney [v2.9.0] (LLMoney.dll)
21:53:22 INFO [Server]   EconomyCore for LiteLoaderBDS
21:53:22 INFO [Server] - ScriptEngine-Lua [v2.9.1] (LiteLoader.Lua.dll)
21:53:22 INFO [Server]   Lua ScriptEngine for LiteLoaderBDS
21:53:22 INFO [Server] - expo_core_old [v1.0.0] (expo_core_old.js)
21:53:22 INFO [Server]   expo_core_old
21:53:22 INFO [Server] - sit [v1.0.0] (sit.js)
21:53:22 INFO [Server]   sit
21:53:22 INFO [Server] - PermissionAPI [v2.9.0] (PermissionAPI.dll)
21:53:22 INFO [Server]   Builtin & Powerful permission API for LiteLoaderBDS
21:53:22 INFO [Server] - ScriptEngine-QuickJs [v2.9.1] (LiteLoader.Js.dll)
21:53:22 INFO [Server]   Javascript ScriptEngine for LiteLoaderBDS
21:53:22 INFO [Server] - dungeons [v1.0.0] (dungeons.js)
21:53:22 INFO [Server]   dungeons
21:53:22 INFO [Server] - ScriptEngine-NodeJs [v2.9.1] (LiteLoader.NodeJs.dll)
21:53:22 INFO [Server]   Node.js ScriptEngine for LiteLoaderBDS
21:53:22 INFO [Server] - exposolia [v1.0.0] (exposolia)
21:53:22 INFO [Server]   Magic and stuff
21:53:22 INFO [Server]
21:53:22 INFO [Server]
21:53:22 INFO [Server] * Напишите в командной строке "ll list <Plugin Name>" для получения дополнительной информации
@dreamguxiang dreamguxiang added bug Related to software malfunction module: script engine priority: high Needs prompt action labels Feb 15, 2023
KobeBryant114514 added a commit to KobeBryant114514/LeviLamina that referenced this issue Mar 1, 2023
KobeBryant114514 added a commit to KobeBryant114514/LeviLamina that referenced this issue Mar 2, 2023
OEOTYAN added a commit to KobeBryant114514/LeviLamina that referenced this issue Mar 2, 2023
@Jasonzyt Jasonzyt linked a pull request Mar 2, 2023 that will close this issue
@Jasonzyt Jasonzyt added this to the 2.12.0 milestone Mar 2, 2023
OEOTYAN added a commit that referenced this issue Mar 2, 2023
* Fix #1088

* Fix PlayerEatEvent

---------

Co-authored-by: OEOTYAN <[email protected]>
@OEOTYAN OEOTYAN closed this as completed Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Related to software malfunction priority: high Needs prompt action
Development

Successfully merging a pull request may close this issue.

4 participants