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 log is still updated even when integrated server doesn't exist (when logged into an external server) #217

Open
DuncanRuns opened this issue Jan 19, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@DuncanRuns
Copy link
Contributor

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.)

@DuncanRuns DuncanRuns added the bug Something isn't working label Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant