Chat event does not fire on (normal) Chatty Turtle
Havaro opened this issue ยท 2 comments
Descripe
The example for the Chat Box does not work for Chatty Turtles. However, it works for Advanced Chatty Turtles and computers with a Chat Box next to them.
It seems like the chat
-event does not get fired on (normal) Chatty Turtles.
This bug report is a result of a conversation on the Intellegence Modding Discord server.
Steps to reproduce
- Create a Chatty Turtle and an Advanced Chatty Turtle;
- Setup the example script on both turtles and run it;
- Write something in the chat.
Now the message will not be shown on the Chatty Turtle, but is shown on the Advanced Chatty Turtle.
Multiplayer?
Yes
Version
0.7.5r (Latest)
Minecraft, Forge and maybe other related mods versions
Fore 36.2.0, Mincraft 1.16.5
Screenshots or Videos
No response
Crashlog/log
No response
After a bit of testing today, everything seems to work just fine.
I'll see if I can release a fix for the chat event at the end of the week.
I tested this issue myself using CC:T 1.98.2, Forge 36.2.0, AP 0.7.5r, and found the opposite situation. It appears that only the first computer placed is getting the message; other computers do not receive it. I'm guessing that this is because the upgrade's update
method immediately consumes the chat message:
https://github.com/Seniorendi/AdvancedPeripherals/blob/887df62cc3aaab363ddfc616d8cbb1b293a84eb8/src/main/java/de/srendi/advancedperipherals/common/events/Events.java#L82-L83
This could be fixed by only dropping the next message at the end of the tick, once all listeners have consumed the event.