telvarost / MojangFix-StationAPI

Minecraft b1.7.3 mod that fixes skins, authentication and more. Now with configs and InventoryTweaks support
https://modrinth.com/mod/mojangfix-stationapi-edition
GNU Lesser General Public License v3.0
2 stars 3 forks source link

Bug causing sounds to not be played for 30-45 seconds #13

Open Jade-TheCat opened 1 month ago

Jade-TheCat commented 1 month ago

When I start the game with MojangFixStAPI installed, no sounds (even menu sounds) play for several seconds, until the following error is spit into the log:

java.net.ConnectException: Connection timed out: connect
    at java.base/sun.nio.ch.Net.connect0(Native Method)
    at java.base/sun.nio.ch.Net.connect(Net.java:579)
    at java.base/sun.nio.ch.Net.connect(Net.java:568)
    at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:593)
    at java.base/java.net.Socket.connect(Socket.java:633)
    at java.base/java.net.Socket.connect(Socket.java:583)
    at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:183)
    at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:533)
    at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:638)
    at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:281)
    at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:386)
    at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:408)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1309)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1242)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1128)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1057)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1687)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1611)
    at java.base/java.net.URL.openStream(URL.java:1161)
    at net.minecraft.class_28.run(class_28.java:28)

After this, all sounds play normally. This only happens with MojangFix installed. I tried using MixinTrace but it doesn't trace unless the game crashes it seems. Not sure which class class_28 is, otherwise I'd submit a PR myself...

Versions: Babric 0.5.0, GlassConfigAPI 2.0.2 & 3.0.1, StationAPI 2.0-alpha.2.4 System: Windows 11, Eclipse Temurin 8.0.412.8

Jade-TheCat commented 1 month ago

Decided to take a look anyway. Probably this line: https://github.com/telvarost/MojangFix-StationAPI/blob/eddac60e1146e940e33baf60b0b5e8a2edca4e25/src/main/java/pl/telvarost/mojangfixstationapi/mixin/client/misc/ResourceDownloadThreadMixin.java#L29

I tried to connect to the URL in the config (http://mcresources.modification-station.net/MinecraftResources/) and it times out in my browser too. Is there a different URL that might work better? Or a possibility to turn off the resource download fix if a player already has them downloaded?

EDIT: Just found the off button in the config. That works for now, but it might be good to either turn it off by default or have a different default URL...

telvarost commented 1 month ago

Hmm the URL resolves fine for me. I wonder if its a country thing. Keep me posted if you'd like any changes. I guess for now I will leave it default true? Idk