Why not use the webwalker? Pretty sure it can solve the whole stronghold with 1 line of code
Only thing you might wanna do is break the webwalking when you need to eat and continue after
Also code like this:
Timing.waitCondition(() -> getWidgets().get(579, 17).isVisible(),30000);
Can cause a lot of errors.
Make sure to null check a widget before checking if it's visible.
Also it's a lot better to not use any widgets IDs as they can change, use widgetsContainingtext instead