OreCruncher / DynamicSurroundingsFabric

Dynamic Surroundings mod for Minecraft
MIT License
62 stars 25 forks source link

[1.20.x] Compatibility with BungeeCord and changing servers #83

Closed WimpieRatte closed 4 months ago

WimpieRatte commented 5 months ago

I suspect it's because of the "Delay processing resource packs/external configurations until later in the startup process." change, because from version 0.3.1, when joining a server that has a custom resource pack, the game freezes with a "Reconfiguring" text, accompanied by an endless spam of this error message, until I "End Task" Java:

[13:14:09] [Render thread/ERROR]: Error executing task on Client net.minecraft.class_148: Main thread packet handler at net.minecraft.class_2600.method_11072(class_2600.java:33) ~[client-intermediary.jar:?] at net.minecraft.class_1255.method_18859(class_1255.java:156) ~[client-intermediary.jar:?] at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[client-intermediary.jar:?] at net.minecraft.class_1255.method_16075(class_1255.java:130) ~[client-intermediary.jar:?] at net.minecraft.class_1255.method_5383(class_1255.java:115) ~[client-intermediary.jar:?] at net.minecraft.class_310.method_1523(class_310.java:1283) ~[client-intermediary.jar:?] at net.minecraft.class_310.method_1514(class_310.java:888) ~[client-intermediary.jar:?] at net.minecraft.client.main.Main.main(Main.java:265) ~[minecraft-1.20.4-client.jar:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.5.jar:?] at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.5.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) ~[fabric-loader-0.15.5.jar:?] at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87) ~[NewLaunch.jar:?] at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130) ~[NewLaunch.jar:?] at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) ~[NewLaunch.jar:?] Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.class_638.method_8428()" because "this.field_3699" is null at net.minecraft.class_634.method_11099(class_634.java:1989) ~[client-intermediary.jar:?] at net.minecraft.class_5900.method_34173(class_5900.java:129) ~[client-intermediary.jar:?] at net.minecraft.class_5900.method_11054(class_5900.java:14) ~[client-intermediary.jar:?] at net.minecraft.class_2600.method_11072(class_2600.java:24) ~[client-intermediary.jar:?] ... 13 more

OreCruncher commented 5 months ago

The delay resource load is waiting for the resource pack reload event, nothing spectacular. What modpack, and did you update any other mods recently? "this.field_3699" appears to be the client packet listener instance, and I don't see dsurround in the trace. Do you have a complete log you can link?

WimpieRatte commented 5 months ago

I can send a full log later, but can confirm that the only change I do is change from 0.3.0 to 0.3.1 and then the issue appears. In the meantime, you can replicate it by: Download and use this modpack: https://modrinth.com/modpack/lekkermanclientside Then update Dynamic Surroundings to 0.3.1 or later. Then join this server: gommehd.net Then try entering their City Building area. The freeze happens as soon as the server tries to switch you to that (because it's a section that prompts and requires a server custom resource pack.)

With 0.3.0, the freeze doesn't happen, of course :).

WimpieRatte commented 5 months ago

Took me hours to pin it to the Dynamic Surroundings mod. (Because I first expected it to be related to a resource pack or a rendering mod, not a sound mod.) Already did the painful journey of testing the mods until this mod was found to be the reason. That's why I wanted to log the ticket, because it's so unexpected and I wanted to save others the debugging time.

OreCruncher commented 5 months ago
Caused by: java.util.NoSuchElementException: No value present
    at java.util.Optional.orElseThrow(Optional.java:377) ~[?:?]
    at org.orecruncher.dsurround.lib.resources.ClientTagLoader.loadTagData(ClientTagLoader.java:88) ~[DynamicSurroundings-Fabric-1.20.4-0.3.2.jar:?]
    at org.orecruncher.dsurround.lib.resources.ClientTagLoader.getTagData(ClientTagLoader.java:72) ~[DynamicSurroundings-Fabric-1.20.4-0.3.2.jar:?]
    at org.orecruncher.dsurround.lib.resources.ClientTagLoader.getMembers(ClientTagLoader.java:42) ~[DynamicSurroundings-Fabric-1.20.4-0.3.2.jar:?]
    at java.util.Map.computeIfAbsent(Map.java:1054) ~[?:?]

It's trying to find a registry associated with a tag and it cannot be found. Joy.

OreCruncher commented 5 months ago

Do you know what changed in the modpack recently? I hacked around the immediate issue with tag loading, and it fails further on in a piece of code I have not touched in a while.

EDIT: FWIW I hacked around THAT problem, and I can get it to load.

WimpieRatte commented 5 months ago

super nice to hear the feedback! Is this a hack that i can apply to the pack as well? Or is this something that can work on a future patch?

OreCruncher commented 5 months ago

Unfortunately, it requires a set of code changes.

OreCruncher commented 4 months ago

Pushed update 0.3.3 to CurseForge and Modrinth.