SuperMartijn642's Core Lib

SuperMartijn642's Core Lib

101M Downloads

[Bug] mouseScrolled delegates wrong amount value to widget

DasRed opened this issue · 1 comments

commented

Version Info

  • Minecraft, [1.21.6,1.22)
  • neoforge_version=21.6.20-beta
  • neoforge_dependency=[21.6.20-beta,)
  • core_library_file=6714183
  • core_library_dependency=[1.1.17,1.2.0)
  • OS: MacOS

Description of the Bug
The scrolling does not work in the Tesseract mod.

Steps to Reproduce

  1. checkout the tesseract mod
  2. start the client
  3. generate a new local world (flat, creative)
  4. create more then 12 entries in the channel list
  5. try to scroll, nothing happends

-> I debug through the code and find out, that the value in verticalAmount in WidgetScreen will not be delegated to a widget. But in verticalAmount is given the correct scroll value.

Screenshots

Image Image

** Wish **
You make very great mod for minecraft. Would be nice to get this fixed in Tesseract for Minecraft 1.21.8 and Neoforge 21.8.33+.

Thank you for your efforts and great work

commented

public boolean mouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount){
int offsetX = (this.width - this.widget.width()) / 2, offsetY = (this.height - this.widget.height()) / 2;
mouseX -= offsetX;
mouseY -= offsetY;
return this.widget.mouseScrolled((int)mouseX, (int)mouseY, horizontalAmount, false) || super.mouseScrolled(mouseX, mouseY, horizontalAmount, verticalAmount);
}

Yup seems it is passing the horizontal scrolling rather than the vertical scrolling 🤦‍♂️