mircokroon / minecraft-world-downloader

Download Minecraft worlds, extend server's render distance. 1.12.2 - 1.21
GNU General Public License v3.0
1.25k stars 84 forks source link

Cannot invoke "game.data.container.MenuRegistry.getSlotCount(int)" because the return value is null #620

Closed memakh closed 1 year ago

memakh commented 1 year ago

Describe the bug Doesn't load any chunks, gives an error after joining the server

Steps to reproduce java -jar world-downloader.jar join the server

Log output

java -jar world-downloader.jar 
Nov 18, 2023 3:39:50 PM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @2ba867a6'
Starting proxy for ----. Make sure to connect to localhost:7007 instead of the regular server address.
Login success: ---- logged in with uuid ----
Using protocol of game version 1.20 (763)
Generating reports for version 1.20.
Downloading this version's server.jar (https://piston-data.mojang.com/v1/objects/15c777e2cfe0556eef19aab534b186c0c6f277e1/server.jar)
java.lang.NullPointerException: Cannot invoke "game.data.container.MenuRegistry.getSlotCount(int)" because the return value of "game.data.registries.RegistryManager.getMenuRegistry()" is null
    at game.data.container.InventoryWindow.<init>(InventoryWindow.java:39)
    at game.data.container.ContainerManager.openWindow(ContainerManager.java:58)
    at packets.handler.version.ClientBoundGamePacketHandler_1_14.lambda$new$1(ClientBoundGamePacketHandler_1_14.java:51)
    at packets.handler.PacketHandler.handle(PacketHandler.java:57)
    at packets.DataReader.readPackets(DataReader.java:163)
    at packets.DataReader.pushData(DataReader.java:118)
    at proxy.ProxyServer.lambda$run$7(ProxyServer.java:106)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at proxy.ProxyServer.lambda$run$9(ProxyServer.java:103)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at proxy.ProxyServer.run(ProxyServer.java:62) 

Version

Using Prism Launcher 7.2 if that matters Linux Mint 21.2 (Victoria)

java --version

openjdk 17.0.8.1 2023-08-24
OpenJDK Runtime Environment (build 17.0.8.1+1-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 17.0.8.1+1-Ubuntu-0ubuntu122.04, mixed mode, sharing)
memakh commented 1 year ago

Fixed by updating Prism Launcher to 8.0, I think during the update it downloaded https://piston-data.mojang.com/v1/objects/15c777e2cfe0556eef19aab534b186c0c6f277e1/server.jar properly, but very slowly (about 16 kb/s which might have been the issue when world downloader tried downloading it).