@ -23,7 +23,7 @@ function initMoves(bot = bot, mcData = bot.mcData) {
movements . push ( normalMove )
movements . push ( normalMove )
movements . defaultMove = movements [ 0 ]
movements . defaultMove = movements [ 0 ]
bot . pathfinder . setMovements ( default Move)
bot . pathfinder . setMovements ( normal Move)
}
}
@ -167,8 +167,8 @@ function moveOrRide(turn = false, reverse = -1, directionLabel, message_parts2)
// bot.once("attach", state = "vehiccel")
// bot.once("attach", state = "vehiccel")
if ( bot . vehicle ) {
if ( bot . vehicle ) {
// FIXME moveVehicle should be +-1 or 0?
// FIXME moveVehicle should be +-1 or 0?
const amount = Math . sign ( parseInt ( message _parts2 [ 0 ] ) || - reverse )
const amount = parseInt ( message _parts2 [ 0 ] ) * - reverse
bot . moveVehicle ( turn && amount || 0 , ! turn && amount || 0 )
bot . moveVehicle ( turn && Math . sign ( amount ) || 0 , ! turn && amount || 0 )
} else {
} else {
command ( [ directionLabel ] . concat ( message _parts2 ) )
command ( [ directionLabel ] . concat ( message _parts2 ) )
}
}