SanAndreaP / BetterCombatRebirth

A continuation of the Better Combat mod from Ironfists for Minecraft 1.12.2 and beyond
HomePage
8 stars 16 forks source link

Unable to attack things #14

Open MechanosG opened 5 years ago

MechanosG commented 5 years ago

So everything was working fine while on an MC server. Then suddenly I was unable to damage anything. This showed up in my client log and happens every time I attempt to attack.

Jul 01, 2019 2:54:57 PM io.netty.channel.embedded.EmbeddedChannel recordException
WARNING: More than one exception was raised. Will report only the first one and log others.
io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: Integer is too big for 4 bytes
    at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:106)
    at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801)
    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814)
    at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794)
    at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831)
    at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1032)
    at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:296)
    at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.sendToServer(SimpleNetworkWrapper.java:321)
    at bettercombat.mod.client.handler.EventHandlersClient.onMouseLeftClick(EventHandlersClient.java:101)
    at bettercombat.mod.client.handler.EventHandlersClient.onMouseEvent(EventHandlersClient.java:52)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1055_EventHandlersClient_onMouseEvent_MouseEvent.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
    at net.minecraftforge.client.ForgeHooksClient.postMouseEvent(ForgeHooksClient.java:273)
    at net.minecraft.client.Minecraft.runTickMouse(Minecraft.java:2275)
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1800)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1098)
    at net.minecraft.client.Minecraft.run(Minecraft.java:3942)
    at net.minecraft.client.main.Main.main(SourceFile:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
Caused by: java.lang.IllegalArgumentException: Integer is too big for 4 bytes
    at org.apache.commons.lang3.Validate.isTrue(Validate.java:109)
    at net.minecraftforge.fml.common.network.ByteBufUtils.writeVarInt(ByteBufUtils.java:133)
    at bettercombat.mod.network.PacketMainhandAttack.toBytes(PacketMainhandAttack.java:35)
    at net.minecraftforge.fml.common.network.simpleimpl.SimpleIndexedCodec.encodeInto(SimpleIndexedCodec.java:30)
    at net.minecraftforge.fml.common.network.simpleimpl.SimpleIndexedCodec.encodeInto(SimpleIndexedCodec.java:26)
    at net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec.encode(FMLIndexedMessageToMessageCodec.java:81)
    at io.netty.handler.codec.MessageToMessageCodec$1.encode(MessageToMessageCodec.java:67)
    at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:88)
    ... 26 more

This is the first time I've seen this happen, and I'm unsure what caused it to start. Using BetterCombat-1.12.2-1.5.6.jar in a 1.12.2 modpack.

MechanosG commented 5 years ago

Happened again today. Still not sure what triggers it to happen, but it's apparently not a one time thing.

MechanosG commented 5 years ago

Quick update. 2 weeks later, server has a couple more people now, and this problem happens every 1 to 3 days roughly. Non melee forms of damage work, such as bows, TC punji sticks, or lava, but player melee damage completely quits working 'till the server is restarted. I still haven't been able to narrow down if anything in specific triggers it, although I slightly suspect the ride-able phoenix from the Exotic Birds mod, as I have noticed the bug happen several times after I had ridden it. Could be coincidence though.

If you have any questions that might help you figure out what's going on, feel free to ask. As it is, I'm forced to consider removing BCR from my modpack to regain melee functionality (although losing the +1 range on melee will be super painful).