fix(command): 🚧 fix and workaround bot look at this
Workaround being unable to look at what player is looking at. Currently looks at what player is standing on.
This commit is contained in:
parent
4b8a39d38c
commit
f38ad8c819
|
@ -351,6 +351,8 @@ function command(username, message) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
// TODO move look (and maybe find) to informer plugin?
|
||||||
|
case "look":
|
||||||
case "lookat":
|
case "lookat":
|
||||||
// const coords = v(message_parts.splice(1))
|
// const coords = v(message_parts.splice(1))
|
||||||
switch (message_parts.length) {
|
switch (message_parts.length) {
|
||||||
|
@ -369,13 +371,12 @@ function command(username, message) {
|
||||||
|
|
||||||
case "this":
|
case "this":
|
||||||
// TODO lookat the block the user is looking at
|
// TODO lookat the block the user is looking at
|
||||||
|
// Currently looks player position
|
||||||
if (player) {
|
if (player) {
|
||||||
bot.lookAt((new v.Vec3(0, 1, 0)).add(player.position))
|
bot.lookAt(player.position)
|
||||||
todo()
|
|
||||||
} else {
|
} else {
|
||||||
cfg.quiet || bot.chat("can't see you")
|
cfg.quiet || bot.chat("can't see you")
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
const aPlayer = bot.players[message_parts[2]] ? bot.players[message_parts[2]].entity : null
|
const aPlayer = bot.players[message_parts[2]] ? bot.players[message_parts[2]].entity : null
|
||||||
|
|
Loading…
Reference in New Issue
Block a user