BumbleSoftware / Fastload

Mod to accelerate world init
GNU General Public License v3.0
70 stars 14 forks source link

New incompatibility with Remove Reloading Screen #67

Closed DreenDex closed 1 year ago

DreenDex commented 1 year ago

Env: fabric 1.19.4 Fastload+ version: 1.18.2-1.19.4-3.2.0 Remove Reloading Screen version: Rrls-1.5.0-fabric

Reproduction: 1) Open minecraft in minimized windowed mode 2) Go to singleplayer 3) Open any world (i use the arrow button on the latest world icon) 4) Maximize the window while world is still loading (double click on the window titlebar) 5) Main game menu opens as well as you join the world, but you can't play it because you can't close the main menu. 6) Try going to the singleplayer again, and in the world list there is no world you just joined because minecraft client incorrectly handles world file lock in the case of the same game process accessing it.

DreenDex commented 1 year ago

Upon further investigation, it turned out to be a compatibility issue with the Remove Reloading Screen mod. Before this FastLoad update everything was working fine.

DreenDex commented 1 year ago

The problematic part in RemoveReloadingScreen is this code line. It closes the world loading screen fine, but some "magic" from latest Fastload+ update made it so if method MinecraftClient::setScreen invoked with screen set to null, it sets the current screen to Main menu instead of null. Provided behaviour of this method is described in fabricmc yarn documentation.

image

So Fastload+'s part either (1) effectively delays the setting of Minecraft::world field or (2) opens a screen that extends DownloadingTerrainScreen too early. Therefore main menu opens instead of loading screen closing.

StockiesLad commented 1 year ago

The problematic part in RemoveReloadingScreen is this code line. It closes the world loading screen fine, but some "magic" from latest Fastload+ update made it so if method MinecraftClient::setScreen invoked with screen set to null, it sets the current screen to Main menu instead of null. Provided behaviour of this method is described in fabricmc yarn documentation.

image

So Fastload+'s part either (1) effectively delays the setting of Minecraft::world field or (2) opens a screen that extends DownloadingTerrainScreen too early. Therefore main menu opens instead of loading screen closing.

It overrides LevelLoadingScreen. It doesn't delay the loading of ClientWorld. I'll try to conditionally load fastload and try my best to stop it from interferring with other loading screens.

StockiesLad commented 1 year ago

Actually upon more thought, when the pre rendering is disabled. It will use DownloadingTerrainScreen early. Please test whether this still happens when it is enabled.

StockiesLad commented 1 year ago

Issue seems to be fixed here.