o7q / KineticDamage

A highly-configurable Minecraft mod that scales damage and knockback with kinetic energy.
MIT License
0 stars 1 forks source link

Crash when hitting things randomly #6

Open ThatKatNaps opened 3 months ago

ThatKatNaps commented 3 months ago

Describe the bug sometimes when hitting enemies you get disconnected from both dedicated and local games.

To Reproduce Steps to reproduce the behavior:

  1. load world
  2. punch a mob like your life depends on it for the most reliable way to replicate
  3. get disconnected on both dedicated and local

Additional context I have a smaller mods list where its also consistent that I can get a log from if it helps. Use find with [07:01:39] [Netty Server IO #1/ERROR]: Encountered exception while handling in channel with name "kineticdamage:attack" to find the crash faster latest.log

o7q commented 3 months ago

This is caused by the AttackC2SPacket. I am looking for ways to fix this. Currently the players speed is calculated on the client and sent to the server as a packet. I'd like to find a way to calculate the players speed on the server, for some reason no one has been able to answer this question in the Fabric Discord or GitHub discussions page! Been stuck on this for the past year, as soon as I figure this out I can fix this bug.