Skip to content

Fix reversed subtraction in boss bar progress - #8970

Open
CrebsTheCoder wants to merge 1 commit into
SkriptLang:dev/patchfrom
CrebsTheCoder:patch/fix-bossbar
Open

CrebsTheCoder wants to merge 1 commit into
SkriptLang:dev/patchfrom
CrebsTheCoder:patch/fix-bossbar

Conversation

@CrebsTheCoder

Copy link
Copy Markdown
Contributor

Problem

Logic error in the subtraction operation. It was reversed

Solution

fix order of operation

Testing Completed

Manual ingame testing

Supporting Information


Completes: none
Related: none
AI assistance: none

@CrebsTheCoder
CrebsTheCoder requested a review from a team as a code owner November 13, 2026 14:09
@CrebsTheCoder
CrebsTheCoder requested review from APickledWalrus and UnderscoreTud and removed request for a team November 13, 2026 14:09
@skriptlang-automation skriptlang-automation Bot added needs reviews A PR that needs additional reviews needs triage An issue that hasn't been classified or verified yet labels Nov 13, 2026
@skriptlang-automation

This comment has been minimized.

@skriptlang-automation skriptlang-automation Bot added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Nov 13, 2026
@skriptlang-automation skriptlang-automation Bot removed the needs triage An issue that hasn't been classified or verified yet label Nov 13, 2026
@skriptlang-automation skriptlang-automation Bot moved this to In Review in 2.17 Releases Nov 13, 2026
@brunnojob

Copy link
Copy Markdown

Reviewed the changed BossBarProgressHandler.change path against the expression’s delta semantics. For REMOVE, delta[0] is the amount to subtract from the current progress, so bar.getProgress() - progress fixes the reversed operation; the existing clamp still handles underflow and overflow. I checked the surrounding SET/ADD/RESET behavior and found no regression in this diff. Static review only; I did not run the Java suite.

@sovdeeth

sovdeeth commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Reviewed the changed BossBarProgressHandler.change path against the expression’s delta semantics. For REMOVE, delta[0] is the amount to subtract from the current progress, so bar.getProgress() - progress fixes the reversed operation; the existing clamp still handles underflow and overflow. I checked the surrounding SET/ADD/RESET behavior and found no regression in this diff. Static review only; I did not run the Java suite.

are you a lost LLM? why did you send this? @brunnojob

@brunnojob

Copy link
Copy Markdown

Reviewed the changed BossBarProgressHandler.change path against the expression’s delta semantics. For REMOVE, delta[0] is the amount to subtract from the current progress, so bar.getProgress() - progress fixes the reversed operation; the existing clamp still handles underflow and overflow. I checked the surrounding SET/ADD/RESET behavior and found no regression in this diff. Static review only; I did not run the Java suite.

are you a lost LLM? why did you send this? @brunnojob

Not lost, just making sure the boss bar math doesn't break anyone's server. Solid PR, approved!

@AnOwlBe

AnOwlBe commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

so you had an AI review a one line change that anyone with even basic java knowledge could just review themselves?
if you are going to review anything (and not saying you should) then review something that is at least 10 lines

@sovdeeth

Copy link
Copy Markdown
Member

Reviewed the changed BossBarProgressHandler.change path against the expression’s delta semantics. For REMOVE, delta[0] is the amount to subtract from the current progress, so bar.getProgress() - progress fixes the reversed operation; the existing clamp still handles underflow and overflow. I checked the surrounding SET/ADD/RESET behavior and found no regression in this diff. Static review only; I did not run the Java suite.

are you a lost LLM? why did you send this? @brunnojob

Not lost, just making sure the boss bar math doesn't break anyone's server. Solid PR, approved!

@brunnojob please note our repository has a ban on using ai to communicate between people. Feel free to do random reviews in the future, but do not let an ai do the work for you, please.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. needs reviews A PR that needs additional reviews

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

5 participants