Skip to content

Commit

Permalink
fix scrollingSpeedMultiplier -> scrollSpeedMultiplier
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceWalkerRS committed Dec 23, 2023
1 parent e0f568c commit 89f8f25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public void handleMouse() {
mouseClickMode = 0;
}
if (mouseX >= scrollbarMinX && mouseX <= scrollbarMaxX) {
this.scrollingSpeedMultiplier = -1.0f;
this.scrollSpeedMultiplier = -1.0f;
int maxScroll = this.getMaxScroll();
if (maxScroll < 1) {
maxScroll = 1;
Expand All @@ -302,16 +302,16 @@ public void handleMouse() {
if (heightForScrolling > this.maxY - this.minY - 8) {
heightForScrolling = this.maxY - this.minY - 8;
}
this.scrollingSpeedMultiplier /= (float) (this.maxY - this.minY - heightForScrolling) / (float) maxScroll;
this.scrollSpeedMultiplier /= (float) (this.maxY - this.minY - heightForScrolling) / (float) maxScroll;
} else {
this.scrollingSpeedMultiplier = 1.0f;
this.scrollSpeedMultiplier = 1.0f;
}
this.mouseYStart = mouseClickMode != 0 ? (float) mouseY : -2.0f;
} else {
this.mouseYStart = -2.0f;
}
} else if (this.mouseYStart >= 0.0f) {
this.scrollAmount -= ((float) mouseY - this.mouseYStart) * this.scrollingSpeedMultiplier;
this.scrollAmount -= ((float) mouseY - this.mouseYStart) * this.scrollSpeedMultiplier;
this.mouseYStart = mouseY;
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/modmenu.accesswidener
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ accessible field net/minecraft/client/gui/widget/ListWidget scrollAmount F
accessible field net/minecraft/client/gui/widget/ListWidget mouseYStart F
accessible field net/minecraft/client/gui/widget/ListWidget pos I
accessible field net/minecraft/client/gui/widget/ListWidget time J
accessible field net/minecraft/client/gui/widget/ListWidget scrollingSpeedMultiplier F
accessible field net/minecraft/client/gui/widget/ListWidget scrollSpeedMultiplier F

0 comments on commit 89f8f25

Please sign in to comment.