Create: Diesel Generators

Create: Diesel Generators

3M Downloads

"net.minecraftforge.network.PacketDistributor.getServer()" is null

GitCat3 opened this issue ยท 3 comments

commented

My game is occasionally crashing with the following error, and I believe this mod to be the culprit, is there anything I can do to fix this?

crash error:
NullPointerException: Cannot invoke "net.minecraft.server.MinecraftServer.m_6846_()" because the return value of "net.minecraftforge.network.PacketDistributor.getServer()" is null

full log:
crash-2025-05-20_21.00.17-client.txt

commented

Cool! Thanks so much! Out of curiosity what do you think is causing it? I'm a programmer myself so I always love to get a look behind the curtain.

commented

I have not encountered this problem before, I think I know whats causing this and it should be fixed within the next update

commented

normally the server side sends the client side all fuel types, but sometimes, because of my weird implementation of the fuel types, the client side tries to send the fuel types. Right now i kind of did a try catch solution, but I plan on using a datapack registry (just like creates potato cannon projectile types), instead of just reading them with a reload listener.