[pick pr?] fix some bugs?
This commit is contained in:
parent
2e55b6398e
commit
73ef18fdae
3 changed files with 4 additions and 4 deletions
4
index.js
4
index.js
|
|
@ -361,10 +361,10 @@ async function connect (options) {
|
|||
bot.setControlState('jump', true)
|
||||
break
|
||||
case 'KeyD':
|
||||
bot.setControlState('left', true)
|
||||
bot.setControlState('right', true)
|
||||
break
|
||||
case 'KeyA':
|
||||
bot.setControlState('right', true)
|
||||
bot.setControlState('left', true)
|
||||
break
|
||||
case 'KeyS':
|
||||
bot.setControlState('back', true)
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class BossBar extends LitElement {
|
|||
|
||||
setTitle (bar) {
|
||||
if (bar._title.text) this.title = bar._title.text
|
||||
else this.title = translations[this._title.translate] || 'Unkown Entity'
|
||||
else this.title = translations[this._title.translate] || 'Unknown Entity'
|
||||
}
|
||||
|
||||
setColor (bar) {
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ class Hotbar extends LitElement {
|
|||
})
|
||||
|
||||
document.addEventListener('keydown', (e) => {
|
||||
const numPressed = e.code.substr(5)
|
||||
const numPressed = +(e.code.match(/Digit(\d)/)?.[1] ?? -1)
|
||||
if (numPressed < 1 || numPressed > 9) return
|
||||
this.reloadHotbarSelected(numPressed - 1)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue