-
-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Describe the bug
When you do a client side triggered event such as a dimension switch, it can be triggered even when on an external server, causing the events log of the latest singleplayer world to be updated with events that happen in the external server, even though that singleplayer world is not being played.
https://github.com/RedLime/SpeedRunIGT/blob/1.16.1/src/main/java/com/redlimerl/speedrunigt/mixins/MinecraftClientMixin.java#L302
SpeedRunIGT/src/main/java/com/redlimerl/speedrunigt/mixins/screen/CreditsScreenMixin.java
Line 24 in 03ec3c7
| GameInstance.getInstance().callEvents("roll_credits"); |
Multiple in
| public static void start(String worldName, RunType runType) { |
Most notably, for advancement related events:
SpeedRunIGT/src/main/java/com/redlimerl/speedrunigt/mixins/ClientAdvancementManagerMixin.java
Line 53 in 03ec3c7
| GameInstance.getInstance().callEvents("advancement", factory -> advancement.getId().getPath().equalsIgnoreCase(factory.getDataValue("advancement"))); |
To Reproduce
Steps to reproduce the behavior:
- Start a singleplayer world, trigger some event like obtaining iron an iron ingot to ensure your event log is going
- Join a friend's game, get another advancement related event (or one of the other client triggered events above)
Expected behavior
The client triggered event done on the external server shouldn't add to the latest singleplayer event log
Versions info :
- MC Version: 1.16.1
- SpeedRunIGT Version: latest
- Fabric Loader Version: probably near latest
Additional context
I've already known about this for a while, but forgot to report it, it recently came up when I saw specnr appear on paceman yet he was playing co-op: https://paceman.gg/stats/run/972385/
As a solution, you can check for an integrated server existing when events are added, but be careful around events near the creation/deletion of the integrated server (e.g. join and leave world events, cheat events for worlds created directly with cheats, etc.)