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

[Compat] doesn't capture new screens with randompatches #12

Closed
supersaiyansubtlety opened this issue Jan 23, 2021 · 20 comments
Closed

[Compat] doesn't capture new screens with randompatches #12

supersaiyansubtlety opened this issue Jan 23, 2021 · 20 comments

Comments

@supersaiyansubtlety
Copy link

When using this mod and random patches, no new screenshots are saved when exiting a world.

random settings:
randompatches.toml

  • randompatches-2.1.9-fabric
  • seamless-loading-screen-1.1.0+1.16
@Minenash
Copy link
Owner

Does setting return_to_main_menu_after_disconnect to false fix it?

@supersaiyansubtlety
Copy link
Author

It doesn't

@Minenash
Copy link
Owner

What about adding GameMenuScreen to the mixing blacklist?

@Minenash Minenash reopened this Jan 23, 2021
@supersaiyansubtlety
Copy link
Author

Yup! Thanks

@Minenash
Copy link
Owner

Unless there's more demand for it, I don't think I'll add compat with that feature, at least for now. The way random patches applies the mixin, there doesn't seem like a way to do it without them moving the logic part of their code to a non-mixin class, so i can mixin it.

@supersaiyansubtlety
Copy link
Author

Sounds good, that's why randompatches lets you blacklist mixins anyways.

Thanks for pinpointing the issue.

@srnyx
Copy link

srnyx commented Feb 12, 2021

What about adding GameMenuScreen to the mixing blacklist?

How do I do this? Like how do I format it?
This is what it is by default: mixin_blacklist = []

@supersaiyansubtlety
Copy link
Author

mixin_blacklist = ["GameMenuScreen"]

@srnyx
Copy link

srnyx commented Feb 12, 2021

mixin_blacklist = ["GameMenuScreen"]

Thanks!

@srnyx
Copy link

srnyx commented Feb 12, 2021

Wait, but look:
- GameMenuScreen:
⠀⠀⠀- Required for making Minecraft show the main menu screen after disconnecting rather than the Realms or multiplayer screen.
⠀⠀⠀- If Seamless Loading Screen is installed, this is disabled, and FinishQuit is used instead.

@supersaiyansubtlety
Copy link
Author

Oh right, I forgot that since randompatches 'added compatibility' with seamless loading, I've had to just uninstall randompatches from my client.

Maybe try blacklisting "FinishQuit" as well?

@Minenash
Copy link
Owner

Okay, so I know what's happening now. In one of my recent releases, I changed the quit method to static (this was to add support for taking the screenshot when closing the window, not just the quit button), and randompatches is calling it thinking it's not static.

The release that changed this is v1.3.0, so you can downgrade until randompatches releases a fix (also cool to know they added support 🙂 )

@TheRandomLabs
Copy link

Fixed!

@srnyx
Copy link

srnyx commented Feb 12, 2021

Fixed!

Dang, that was fast, thank you!

@supersaiyansubtlety
Copy link
Author

I'm still having issues, with only these mods installed:

  • seamless-loading-screen-1.3.1+1.16.2.jar
  • randompatches-2.4.1-fabric.jar
  • fabric-api-0.30.0+1.16.jar
    I get a crash upon exiting a world

latest.log

crash.txt

@Minenash
Copy link
Owner

Are you using realms? If not, does it happen without randompatches?

@supersaiyansubtlety
Copy link
Author

No realms, just singleplayer, and it only happens when I have both randompatches and seamless.

@Minenash
Copy link
Owner

Minenash commented Feb 13, 2021

Just took a look at their mixin, and I see where the problem is. To sync with the render thread, I use a screen and take the screenshot in the render. When Fabric API 0.30.0 came out with the new screen api, if a screen's render method was called during another screen's render method, then it'd crash the way it did for you. My patch solution was disabling a null check, and giving what was null, a value. But to not break other stuff, I only made it run during when it was quiting. However the randompatches mixin skips this. This (probably) could be fixed by adding this line into the mixin:

SeamlessLoadingScreen.isDisconnecting = true;

I might find a better workaround, (that's not fapi 0.30.0+ only), but there was also the idea of fixing the source issue in fapi's screen api

@TheRandomLabs
Copy link

Thanks for the easy fix! Let me know if you end up finding a better workaround. 😄

@srnyx
Copy link

srnyx commented Feb 13, 2021

This thread is why I like Fabric better than Forge lmfao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants