fix(mover): 🐛 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.
This commit is contained in:
parent
e5803eee59
commit
135ce6567b
|
@ -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))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user