Skip to content

Event log is still updated even when integrated server doesn't exist (when logged into an external server) #217

@DuncanRuns

Description

@DuncanRuns

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

GameInstance.getInstance().callEvents("roll_credits");

Multiple in
public static void start(String worldName, RunType runType) {

Most notably, for advancement related events:
GameInstance.getInstance().callEvents("advancement", factory -> advancement.getId().getPath().equalsIgnoreCase(factory.getDataValue("advancement")));

To Reproduce
Steps to reproduce the behavior:

  1. Start a singleplayer world, trigger some event like obtaining iron an iron ingot to ensure your event log is going
  2. 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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions