Better Combat [Fabric & Forge]

Better Combat [Fabric & Forge]

25M Downloads

Fails if too many weapons are declared.

LunarNox opened this issue ยท 2 comments

commented

apon loading a world after adding the entirety of gate of babylons weapons excluding the yoyos and boomerangs, and also adding every tool except the hoe, the game throws an error stating that the string is too long, and crashes.
Encountered an unexpected exception
io.netty.handler.codec.EncoderException: String too big (was 52451 bytes encoded, max 32767)
at net.minecraft.class_2540.method_10788(class_2540.java:519)
at net.minecraft.class_2540.method_10814(class_2540.java:513)
at net.bettercombat.logic.WeaponRegistry.updateEncodedRegistry(WeaponRegistry.java:113)
at net.bettercombat.logic.WeaponRegistry.loadAttributes(WeaponRegistry.java:101)
at net.bettercombat.BetterCombat.lambda$onInitialize$0(BetterCombat.java:20)
at net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents.lambda$static$2(ServerLifecycleEvents.java:49)
at net.minecraft.server.MinecraftServer.handler$zmn000$afterSetupServer(MinecraftServer.java:2812)
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:676)
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:273)
at java.base/java.lang.Thread.run(Thread.java:833)

commented

Fixed by writing the packet byteBuffer in chunks instead a single massive string.
Feel free to reopen the issue, if you face the problem again.

commented

Hello!
Thanks for the report, I will fix the issue as soon as I can.