PaperMC/paper-server
Bjarne Koll b8a0541ccf
Fix 0 parameter in Player#applyMending (#11802)
Prevent division by zero in Player#applyMending by simply using zero
instead if the divider itself is zero.
This matches vanilla behaviour in the sense that
ExperienceOrb#repairPlayerItems, which this logic is lifted from, does
pass zero to the enchantment helper and runs its first iteration on
repairing. Vanilla is not affected as the computation failing with zero
is used to compute the leftover exp value, which is not needed if zero
itself is passed in.
As the paper impl however exposes said value to the initial event, our
code needs to account for the zero division.
2024-12-24 10:58:58 +01:00
..
patches Fix dropper inventory var 2024-12-23 20:21:31 +01:00
src Fix 0 parameter in Player#applyMending (#11802) 2024-12-24 10:58:58 +01:00
build.gradle.kts [ci skip] Comment out update tasks, update comments 2024-12-23 12:29:27 +01:00
LGPL.txt We're LGPL. 2011-01-02 10:58:11 +01:00
LICENCE.txt We're LGPL. 2011-01-02 10:58:11 +01:00