Mouse 4 as back

Adds a hotkey that allows you to go to the previous screen if possible.
Support Bikerboys!
Create a server, get 25% off your first monthaffiliate logo
Create Server
affiliate banner image

Adds a new keybind that makes you go back to the previous screen.

It has 4 ways of finding the previous screen.

 

It first tries to find any buttons on screen that in the en_us language, has any of these words as its title: back, return, done, cancel. If it finds any button that only contain one of those words, then it will click that.

 

If that fails, it tries to check the screen class. Some screens store a variable to remember the previous screen it was on. Think going from the video settings subscreen back to the settings screen. The mod tries to find any field that is named the following: previous, previousscreen, lastscreen, parent, parentscreen. These variable names are taken from any vanilla screen class I can find. If you have suggestions of ones to add then im all ears.

 

If that fails. It tries to go to the extending class. Some classes extend other classes and the class they extend may store a variable to the previous screen. So it tries to search with a depth of 7, arbitrarily chosen, and does the field technique described above.

 

If all of that fails, it tries calling the close method, basically just pressing escape.

 

If you are for some reason wondering, as a mod dev, on how to make sure this mod works. Then just simple have either a button that only has the text being: back, return, done, cancel. Or store a previous screen variable as previous, lastscreen, previousscreen, parent, parentscreen

The Mouse 4 as back Team

profile avatar
  • 7
    Followers
  • 34
    Projects
  • 432.8K
    Downloads
Donate

More from bikerboysView all

  • Clearviews project image

    Clearviews

    • 34.0K
    • Mods

    removes the annoying blindness/nausea/darkness effects and removes overlays like water fog, pumpkin, spyglass, portal, fire, vignette and locator bar. Compatible with sodium and highly configurable

    • 34.0K
    • June 19, 2026
    • Mods
    • +2
  • Alex's improvements (Create CROWNS x Create: More Burners Compat) project image

    Alex's improvements (Create CROWNS x Create: More Burners Compat)

    • 23.6K
    • Mods

    Adds compatibility for the create: CROWNS heat exchanger to accept create: More Burners and more stuff that improves on other mods and adds compatibility.

    • 23.6K
    • June 16, 2026
    • Mods
    • +3
  • Toggleable Offhand Placing (TOP) project image

    Toggleable Offhand Placing (TOP)

    • 1.9K
    • Mods

    Toggleable Offhand Placing, aka TOP, adds a new keybind that disables or enables the placing of blocks in your offhand, that way you can hold torches without accidentally placing them!

    • 1.9K
    • June 7, 2026
    • Mods
  • Jumping Boats project image

    Jumping Boats

    • 801
    • Mods

    Allows you to jump while in boats to easily go from water to land or jump over obstacles.

    • 801
    • April 5, 2026
    • Mods
    • +1
  • Clearviews project image

    Clearviews

    • 34.0K
    • Mods

    removes the annoying blindness/nausea/darkness effects and removes overlays like water fog, pumpkin, spyglass, portal, fire, vignette and locator bar. Compatible with sodium and highly configurable

    • 34.0K
    • June 19, 2026
    • Mods
    • +2
  • Alex's improvements (Create CROWNS x Create: More Burners Compat) project image

    Alex's improvements (Create CROWNS x Create: More Burners Compat)

    • 23.6K
    • Mods

    Adds compatibility for the create: CROWNS heat exchanger to accept create: More Burners and more stuff that improves on other mods and adds compatibility.

    • 23.6K
    • June 16, 2026
    • Mods
    • +3
  • Toggleable Offhand Placing (TOP) project image

    Toggleable Offhand Placing (TOP)

    • 1.9K
    • Mods

    Toggleable Offhand Placing, aka TOP, adds a new keybind that disables or enables the placing of blocks in your offhand, that way you can hold torches without accidentally placing them!

    • 1.9K
    • June 7, 2026
    • Mods
  • Jumping Boats project image

    Jumping Boats

    • 801
    • Mods

    Allows you to jump while in boats to easily go from water to land or jump over obstacles.

    • 801
    • April 5, 2026
    • Mods
    • +1