Repository navigation
Fix truncation of Baritone long settings - #6651
Big-Iron-Cheems merged 3 commits into
Conversation
|
Hi! Just a friendly ping on this PR. 🙂 The CI is passing and the PR should be ready for review. When someone has time, I'd really appreciate a review. Thanks! |
|
Could you add max/min constraints to LongSetting, like the other numeric settings have. I would also like to hear your opinion on whether a slider should be added - it seems impractical for Long values but I could be convinced either way. |
I can add min/max support. But LongSetting seems to only be used for seeds at the moment, so does it really need a slider? We can add one later if needed. |
|
Interesting work, I have one additional question:
One related detail: the filter uses Unrelated sidenote: I just noticed that our other numeric type handlers do not use their |
I used WTextBox to keep the changes as small as possible, but I’m happy to extract a WLongEdit if that would be more consistent with the existing numeric widgets. |
|
I checked this against JDK 25: |
Ah yea |
|
Could we merge this fix as-is to keep the PR focused? I’ll open a follow-up PR to extract a dedicated |
|
Sure, I'll merge this one for now to avoid scope creep. |
Type of change
Description
Baritone
Longsettings were wrapped inIntSetting, so opening the settings tab converted their values to 32-bit integers and wrote the truncated values back to Baritone.This adds a
LongSettingwith a text-box editor and uses it for every BaritoneLongvalue.Related issues
Fixes #6219
How Has This Been Tested?
./gradlew build.7540332306713543803, round-trips throughLongSettingwithout truncation and that overflowing input is rejected.LongSettingusage and the absence ofLong.intValue()calls.Checklist: