cabaletta / baritone

google maps for block game
GNU Lesser General Public License v3.0
7.24k stars 1.45k forks source link

moveTowardsBlock should consider moving backwards as well as forwards #45

Open leijurv opened 6 years ago

leijurv commented 6 years ago

Right now it just looks at the destination and holds W, it should instead consider looking away and holding S if close enough. Basically, something like MovementManager.moveTowardsCoords from MineBot: https://github.com/leijurv/MineBot/blob/master/mcp918/src/minecraft/minebot/movement/MovementManager.java#L136

leijurv commented 6 years ago

If this happens, make sure it doesn't break hacks like this: https://github.com/cabaletta/baritone/blob/master/src/main/java/baritone/pathing/movement/movements/MovementTraverse.java#L212

                            MovementHelper.moveTowards(state, dest);
                            state.setInput(InputOverrideHandler.Input.MOVE_FORWARD, false);
                            state.setInput(InputOverrideHandler.Input.MOVE_BACK, true);