Commit 1b05fd2
Fix MathUtils.uniformRangeInclusive to handle inverted ranges
Instead of throwing IllegalArgumentException when min > max,
automatically swap the values. This prevents crashes when
NPC configs have misconfigured min/max trade values.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 3fdad96 commit 1b05fd2
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| |||
0 commit comments