From 135ce6567b2b120812a2eb75ec72d8a54b104bee Mon Sep 17 00:00:00 2001 From: jay Date: Wed, 14 Apr 2021 09:57:36 +0500 Subject: [PATCH] fix(mover): :bug: attempt to fix move while riding vehicle Try to give a larger range and more freedom to see if other values work. Specifically, attempt turning. No test on vehicles or mobs appear to behave consistently so far. Tried: pigs, minecarts, horse. --- lib/plugins/mover.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/mover.js b/lib/plugins/mover.js index d93b12d..e147b13 100644 --- a/lib/plugins/mover.js +++ b/lib/plugins/mover.js @@ -167,8 +167,8 @@ function moveOrRide(turn = false, reverse = -1, directionLabel, message_parts2) // bot.once("attach", state = "vehiccel") if (bot.vehicle) { // FIXME moveVehicle should be +-1 or 0? - const amount = Math.sign(parseInt(message_parts2[0]) || -reverse) - bot.moveVehicle(turn && amount || 0, !turn && amount || 0) + const amount = parseInt(message_parts2[0]) * -reverse + bot.moveVehicle(turn && Math.sign(amount) || 0, !turn && amount || 0) } else { command([directionLabel].concat(message_parts2)) }