Skip to content

fix(HoleFiller): share the remaining block budget between targets - #9365

Merged
MukjepScarlet merged 4 commits into
CCBlueX:nextgenfrom
c8dhjp4tyv-bit:fix/holefiller-shared-budget
Oct 7, 2026
Merged

MukjepScarlet merged 4 commits into
CCBlueX:nextgenfrom
c8dhjp4tyv-bit:fix/holefiller-shared-budget

Conversation

@c8dhjp4tyv-bit

Copy link
Copy Markdown
Contributor

iterateHoles() returns its original item budget after partially consuming it. In smart mode, three available blocks can therefore queue two separate two-block holes for different targets.

Return the remaining budget so later targets cannot spend items already assigned to a hole, while keeping creative mode exempt from the outer budget check. Adds a client regression with two independent player targets for competing holes, sufficient and insufficient budgets, duplicate holes and the creative-mode exemption.

Related to #9327, finding 7.

Validation: build and client game tests passed. The added regression also fails for its intended reason on unmodified sources.

@liquidbounce-support-bot

Copy link
Copy Markdown
Contributor

Thanks for this — sharing the remaining budget instead of the original one looks right, and the regression test with a case that fails on unmodified sources is exactly what makes it easy to trust.

Related: this is finding 7 from the audit in #9327.

Two small notes for the reviewer:

  • The gametest reaches collectHolesSmart through reflection (getDeclaredMethod + isAccessible = true), which ties it to private internals. Extracting the budget bookkeeping into an internal/testable function would be less brittle long-term.
  • remainingItems vs. remainingItems1 is hard to read at the return site; renaming the mutated one (e.g. itemsAfterHoles) would make the fix self-evident.

No user-facing behaviour or settings change here, so nothing needed on the HoleFiller docs page.


🤖 Automated support reply — a human maintainer will review if this doesn't help.

Comment thread src/gametest/kotlin/net/ccbluex/liquidbounce/gametest/HoleFillerBudgetGameTest.kt Outdated
@MukjepScarlet
MukjepScarlet merged commit 92eb389 into CCBlueX:nextgen Oct 7, 2026
6 checks passed
@MukjepScarlet MukjepScarlet added this to the 0.42.0 milestone Oct 7, 2026
@c8dhjp4tyv-bit
c8dhjp4tyv-bit deleted the fix/holefiller-shared-budget branch October 7, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants