up mouse allowing to disable positive break block

This commit is contained in:
Vitaly Turovsky 2025-08-27 19:50:53 +03:00
commit 1f240d8c20
3 changed files with 7 additions and 19 deletions

View file

@ -157,7 +157,7 @@
"mc-assets": "^0.2.62",
"minecraft-inventory-gui": "github:zardoy/minecraft-inventory-gui#next",
"mineflayer": "github:zardoy/mineflayer#gen-the-master",
"mineflayer-mouse": "^0.1.17",
"mineflayer-mouse": "^0.1.21",
"npm-run-all": "^4.1.5",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",

10
pnpm-lock.yaml generated
View file

@ -347,8 +347,8 @@ importers:
specifier: github:zardoy/mineflayer#gen-the-master
version: https://codeload.github.com/zardoy/mineflayer/tar.gz/86e65631e79c490021afc63c80091a7bb6019fa8(encoding@0.1.13)
mineflayer-mouse:
specifier: ^0.1.17
version: 0.1.17
specifier: ^0.1.21
version: 0.1.21
npm-run-all:
specifier: ^4.1.5
version: 4.1.5
@ -6678,8 +6678,8 @@ packages:
resolution: {tarball: https://codeload.github.com/zardoy/mineflayer-item-map-downloader/tar.gz/a8d210ecdcf78dd082fa149a96e1612cc9747824}
version: 1.2.0
mineflayer-mouse@0.1.17:
resolution: {integrity: sha512-0eCR8pnGb42Qd9QmAxOjl0PhA5Fa+9+6H1G/YsbsO5rg5mDf94Tusqp/8NAGLPQCPVDzbarLskXdjR3h0E0bEQ==}
mineflayer-mouse@0.1.21:
resolution: {integrity: sha512-1XTVuw3twIrEcqQ1QRSB8NcStIUEZ+tbxiAG6rOrN/9M4thhtlS5PTJzFdmdrcYgWEBLvuOdJszaKE5zFfiXhg==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
mineflayer@https://codeload.github.com/zardoy/mineflayer/tar.gz/86e65631e79c490021afc63c80091a7bb6019fa8:
@ -17359,7 +17359,7 @@ snapshots:
- encoding
- supports-color
mineflayer-mouse@0.1.17:
mineflayer-mouse@0.1.21:
dependencies:
change-case: 5.4.4
debug: 4.4.1

View file

@ -47,19 +47,7 @@ const registerBlockInteractionsCustomizationChannel = () => {
registerChannel(CHANNEL_NAME, packetStructure, (data) => {
const config = JSON.parse(data.newConfiguration)
if (config.customBreakTime !== undefined && Object.values(config.customBreakTime).every(x => typeof x === 'number')) {
bot.mouse.customBreakTime = config.customBreakTime
}
if (config.customBreakTimeToolAllowance !== undefined) {
bot.mouse.customBreakTimeToolAllowance = new Set(config.customBreakTimeToolAllowance)
}
if (config.blockPlacePrediction !== undefined) {
bot.mouse.settings.blockPlacePrediction = config.blockPlacePrediction
}
if (config.blockPlacePredictionDelay !== undefined) {
bot.mouse.settings.blockPlacePredictionDelay = config.blockPlacePredictionDelay
}
bot.mouse.setConfigFromPacket(config)
}, true)
}