Affects Version/s: Minecraft 1.14.2, 20w17a
Fix Version/s: 1.16 Release Candidate 1
When an arrow with a very high damage value (or a really high speed) deals critical damage and hits an entity, the server can crash.
- Switch to Survival mode
The game crashes once the arrow hits you
20w17a, Mojang names
The fix for
MC-87655 made sure, that the damage value used for damage calculation is always >= 0. However, if the result of damage * speed becomes > Integer.MAX_VALUE the result overflows and becomes negative (see MC-181312). If the arrow is dealing critical damage (crit:1b), this negative value is passed to java.util.Random.nextInt(int), the exception seen in the crash report is thrown.
MC-181312 was fixed, the calculated damage would overflow after adding the critical damage bonus, which might currently not cause any crashes, but could in the future.
Therefore, it would make sense to clamp the damage to a maximum (e.g. of Integer.MAX_VALUE / 2, or even smaller) since higher damage will likely never occur in vanilla gameplay anyway and would likely kill any entity instantaneously.