Affects Version/s: Minecraft 1.12.2, Minecraft 18w10b, Minecraft 18w10c, Minecraft 18w10d, Minecraft 18w22c, Minecraft 1.13, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w12b, Minecraft 19w13b, 1.15.2, 1.16 Release Candidate 1, 1.16
Fix Version/s: None
Some buttons in guis can be pressed with any mouse button, not just the left mouse button. Buttons should only be pressable with the left mouse button.
Note: For the purposes of this ticket I will be using the community made mappings for the names of classes, fields, and methods.
An IGuiListEntry is an element on the screen that is scrolled when a scrollbar is moved.
Some (but not all) subclasses of IGuiListEntry do not implement the mousePressed method correctly. This allows them to be interacted with using any mouse button, including any extra mouse buttons a user's mouse may have, such as the scroll wheel button, MB4, MB5, etc.
A few good examples of this are in the world selection gui and the video settings gui.
Notice that if you click a world in the world selection screen or any button/horizontal scrollbar in the video settings screen with any button other than the left mouse button, it still presses the button.
Some instances of IGuiListEntry are implemented correctly. Notice that clicking any mouse button other than the left mouse button in the Language Selection screen, Controls screen, or the resource pack selection screen does not cause the button(s) to be pressed.
Notice that the code below (from GuiListWorldSelectionEntry) never checks which mouse button is pressed.
A simple one patch would fix this issue in this case: