DaDerpDuck / Seamless-Loading-Screen-Forge

Forge port. Takes a screenshot of the game when you leave a world or server, and displays it when you rejoin it
https://www.curseforge.com/minecraft/mc-mods/seamless-loading-screen-forge
MIT License
3 stars 0 forks source link

Mod doesn't properly handle ipv6 addresses #16

Closed embermctillhawk closed 1 year ago

embermctillhawk commented 1 year ago

When connecting to a server, the mod uses a screenshot filename based off the server address. This is fine for IPv4 servers or named servers. However, if the server uses IPv6, including LAN servers, the filename MUST be munged. Windows machines do not allow colons in filenames.

Most users wouldn't/couldn't know how to force Minecraft to announce IPv4 only if they have an IPv6 enabled network.

Or maybe just don't have previews for LAN servers considering their ephemeral nature? Wouldn't fix general IPv6 support but might be easier.

embermctillhawk commented 1 year ago

java.nio.file.InvalidPathException: Illegal char <:> at index 135: C:\Users\hartj\curseforge\minecraft\Instances\Skyward Colonies Explore the Skies with Eureka and Create\screenshots/worlds/servers/2603:90d8:301:8fc6:f1c5:bb90:d71:b4ed_54867.png at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) ~[?:?] {} at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) ~[?:?] {} at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) ~[?:?] {} at sun.nio.fs.WindowsPath.parse(WindowsPath.java:92) ~[?:?] {} at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232) ~[?:?] {} at java.nio.file.Path.of(Path.java:147) ~[?:?] {re:computing_frames} at java.nio.file.Paths.get(Paths.java:69) ~[?:?] {} at com.daderpduck.seamless_loading_screen.ScreenshotLoader.setScreenshot(ScreenshotLoader.java:41) ~[seamless_loading_screen-1.18-3.0.0.jar%23116!/:1.18-3.0.0] {re:classloading} at com.daderpduck.seamless_loading_screen.ScreenshotLoader.setScreenshotServer(ScreenshotLoader.java:32) ~[seamless_loading_screen-1.18-3.0.0.jar%23116!/:1.18-3.0.0] {re:classloading} at com.daderpduck.seamless_loading_screen.events.EventHandler.initGuiEvent(EventHandler.java:40) ~[seamless_loading_screen-1.18-3.0.0.jar%23116!/:1.18-3.0.0] {re:classloading} at net.minecraftforge.eventbus.ASMEventHandler_66_EventHandler_initGuiEvent_InitScreenEvent.invoke(.dynamic) ~[?:?] {} at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-5.0.3.jar%232!/:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.3.jar%232!/:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.3.jar%232!/:?] {}