mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-04-22 06:02:07 +02:00
check creative
This commit is contained in:
parent
f2bf7423ef
commit
b45f49aefd
1 changed files with 1 additions and 1 deletions
|
@ -463,7 +463,7 @@ export async function breakBlockAt(bot, x, y, z) {
|
||||||
bot.pathfinder.setMovements(movements);
|
bot.pathfinder.setMovements(movements);
|
||||||
await bot.pathfinder.goto(new pf.goals.GoalNear(pos.x, pos.y, pos.z, 4));
|
await bot.pathfinder.goto(new pf.goals.GoalNear(pos.x, pos.y, pos.z, 4));
|
||||||
}
|
}
|
||||||
if (bot.gameMode !== 'creative') {
|
if (bot.game.gameMode !== 'creative') {
|
||||||
await bot.tool.equipForBlock(block);
|
await bot.tool.equipForBlock(block);
|
||||||
const itemId = bot.heldItem ? bot.heldItem.type : null
|
const itemId = bot.heldItem ? bot.heldItem.type : null
|
||||||
if (!block.canHarvest(itemId)) {
|
if (!block.canHarvest(itemId)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue