BlockMeter icon indicating copy to clipboard operation
BlockMeter copied to clipboard

Mod tries to send packet when user is kicked

Open BoBkiNN opened this issue 1 year ago • 1 comments

Mod version: 1.9.1

java.lang.IllegalStateException: Cannot send packets when not in game!
	at net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking.send(ClientPlayNetworking.java:370)
	at win.baruna.blockmeter.BlockMeterClient.sendBoxList(BlockMeterClient.java:362)
	at win.baruna.blockmeter.BlockMeterClient.clear(BlockMeterClient.java:143)
	at win.baruna.blockmeter.BlockMeterClient.disable(BlockMeterClient.java:117)
	at win.baruna.blockmeter.BlockMeterClient.reset(BlockMeterClient.java:127)
	at win.baruna.blockmeter.BlockMeterClient.onDisconnected(BlockMeterClient.java:211)
	...

Crash log

crash-2023-11-05_13.01.41-client.txt

BoBkiNN avatar Nov 05 '23 10:11 BoBkiNN

this is probably the underlying issue of #40. Maybe I can just ignore this error to avoid the crash or have safeguards to not actually send after being disconnected.

I do have a mixin to remove boxes on disconnect, but maybe this is not called when being kicked.

ModProg avatar Nov 05 '23 12:11 ModProg