SBM banner

SBM

4 devlogs
11h 27m 14s

SBM stands for SkyBlockMacro, a Minecraft mod (Fabric) for 1.21.11+ which aims to automate repetitive tasks in Hypixel SkyBlock.

Demo Repository

Loading README...

Blasty

Shipped this project!

Hours: 11.45
Cookies: 🍪 230
Multiplier: 20.06 cookies/hr

Minecraft mod (Fabric, 1.21.11) that automates playing Hypixel SkyBlock. Currently supports S-shaped farms and serving Garden Visitors*. See the GitHub release (demo link) and README.md for more details.

It uses a worker thread so that macros can run procedurally, without being in a tick loop. This allows for writing macros more similarly to using something like PyAutoGUI or AutoHotkey.

  • macro stops after all visitors are served (to be fixed later due to high complexity)
Blasty

Implemented the part of the Farming macro which serves Garden Visitors automatically, buying items from the Bazaar if necessary. Note that to use this feature, you must have a Booster Cookie active and have enough coins in your purse to buy the items.

This feature was “kinda” hard to implement (lol), I couldn’t get the sign (input quantity to buy) to work to save my life

Notable changes (features/code):

  • Added a mixin that targets ChatHud.class to check if the visitor macro should run whenever a visitor arrives on the Garden
  • Got rid of some redundant wasPaused checks since some code should run anyway
  • The number of visitors waiting is read from the Tablist
  • Added automatic instant-buying from the Bazaar using /bz (will move to a utility class in the future)

In the video, the distance that the player walks forward for each visitor is a bit far, so this was not done for the last visitor (and can also be easily reduced in code).

I suspect that serving visitors automatically could break due to lag, so this feature might not be suitable for too many players. While testing this feature, I realised that instead of only being part of a macro, this could be used to serve visitors when actually playing the game so you don’t have to think.

Currently, the macro doesn’t return to farming after serving visitors. That’s gonna be pretty hard to implement. Instead I might just call it a feature: farming macro runs until max visitors. To get around this, just disable serving visitors in the config.

1

Comments

Osi
Osi 2 months ago

Cool project, how do you add those annotations like ChatHud.class etc

Blasty

Added more config options for the Farming macro and reduced the required setup on each start.

Specifically:

  • (whether to) warp to garden using /warp garden when starting farming
  • how many ticks to wait before and after warping
  • utility methods to worry less about thread safety
  • added command /sbm with subcommands start, pause, resume for convenience
  • hold sneak to stop flying if flying when macro started
  • set hotbar slot to tool hotbar slot when macro started

Next planned features are to

  • automatically detect and kill pests
  • automatically serve visitors
1

Comments

elite_punith
elite_punith 2 months ago

epic

Blasty

Added a basic Farming macro for S-shaped farms and configuration for the Number of Rows, Number of Runs, and whether to start with going Left or Right (Bruh I forgot to showcase this in the video)

Additional changes and notes:

  • removed the final keyword from pause() and unpause() of class Macro to allow running logic such as releasing all keys on pause
  • added a keybind for unpausing the macro so that the toggle keybind would start a new instance
  • the macro auto detects whether to move on to the next row by checking if the water canal extends directly forwards

Unfortunately I have to be concious of thread safety while writing the macros

0
Blasty

Created the mod itself and all the boilerplate which will allow for writing the macros themselves, and for making the macros configuarble.

Exactly what was done:

  • Mod created
  • Added Cloth Config configuration class
  • Added Mod Menu Integration
  • Created a framework for writing Macros (pausing, resuming, delaying, etc.)

Upcoming work will focus on developing the Farming macro(s).

Attachment
0