Load My Chunks

Load My Chunks

9.9k Downloads

Crash in multiplayer

vico93 opened this issue ยท 7 comments

commented

Tried for the fist time your mod on multiplayer.

Randomly got this crash that said it was related to your mod.

commented

Already figured it out:

issue is caused by a lack of the line:

NetworkManager.registerS2CPayloadType(LagReadingPacket.TYPE,LagReadingPacket.STREAM_CODEC);

Seems this doesn't affect the client side for whatever reason.

I was not aware that this was required in 1.20.6+, I'll release a hotfix in a few mins.

commented

Hotfix published on modrinth (under review on curseforge) closing.

commented

@Drathonix now it crashes when starting the game (singleplayer):

Description: Initializing game

java.lang.RuntimeException: Could not execute entrypoint stage 'client' due to errors, provided by 'loadmychunks'!
	at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$2(FabricLoaderImpl.java:388)
	at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
	at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:386)
	at net.fabricmc.loader.impl.game.minecraft.Hooks.startClient(Hooks.java:53)
	at net.minecraft.class_310.<init>(class_310.java:477)
	at net.minecraft.client.main.Main.main(Main.java:239)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Caused by: java.lang.IllegalArgumentException: Packet type class_9154[id=loadmychunks:lag] is already registered!
	at net.fabricmc.fabric.impl.networking.PayloadTypeRegistryImpl.register(PayloadTypeRegistryImpl.java:58)
	at dev.architectury.networking.fabric.NetworkManagerImpl$1.registerS2C(NetworkManagerImpl.java:66)
	at dev.architectury.impl.NetworkAggregator.registerS2CReceiver(NetworkAggregator.java:119)
	at dev.architectury.impl.NetworkAggregator.registerReceiver(NetworkAggregator.java:91)
	at dev.architectury.networking.NetworkManager.registerReceiver(NetworkManager.java:102)
	at dev.architectury.networking.NetworkManager.registerReceiver(NetworkManager.java:97)
	at com.vicious.loadmychunks.client.LoadMyChunksClient.init(LoadMyChunksClient.java:66)
	at com.vicious.loadmychunks.unified.LMCCLIENTRY.onInitializeClient(LMCCLIENTRY.java:22)
	at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:384)
	... 6 more
commented

Ah yes, the I code needs to not run on the serverside otherwise it conflicts with the client, sorry about that.

Literally the only line of code in the project that has to be kept serversided, that's just ridiculous.

commented

Ironically this is now a crash in singleplayer. I'll thoroughly test both sides this time rather than being irresponsible.

commented

Actually fixed it this time, shouldn't crash on either side now.

commented

Thanks a lot!