diff --git a/examples/movements.js b/examples/movements.js index c65c734..df706e5 100644 --- a/examples/movements.js +++ b/examples/movements.js @@ -32,7 +32,7 @@ bot.once('spawn', () => { // To make changes to the behaviour, customize the properties of the instance customMoves.canDig = false customMoves.allow1by1towers = false - customMoves.scafoldingBlocks.push(bot.registry.itemsByName.stone.id) + customMoves.scaffoldingBlocks.push(bot.registry.itemsByName.stone.id) // Thing to note scaffoldingBlocks are an array while other namespaces are usually sets customMoves.blocksToAvoid.add(bot.registry.blocksByName.carrot.id) diff --git a/index.d.ts b/index.d.ts index 81bf937..db95f05 100644 --- a/index.d.ts +++ b/index.d.ts @@ -240,7 +240,7 @@ declare module 'mineflayer-pathfinder' { public carpets: Set<number> public openable: Set<number> - public scafoldingBlocks: number[]; + public scaffoldingBlocks: number[]; public maxDropDown: number; public infiniteLiquidDropdownDistance: boolean; diff --git a/lib/movements.js b/lib/movements.js index a7e3505..aa6e985 100644 --- a/lib/movements.js +++ b/lib/movements.js @@ -72,9 +72,9 @@ class Movements { this.replaceables.add(registry.blocksByName.water.id) this.replaceables.add(registry.blocksByName.lava.id) - this.scafoldingBlocks = [] - this.scafoldingBlocks.push(registry.itemsByName.dirt.id) - this.scafoldingBlocks.push(registry.itemsByName.cobblestone.id) + this.scaffoldingBlocks = [] + this.scaffoldingBlocks.push(registry.itemsByName.dirt.id) + this.scaffoldingBlocks.push(registry.itemsByName.cobblestone.id) const Block = require('prismarine-block')(bot.registry) this.fences = new Set() @@ -140,7 +140,7 @@ class Movements { countScaffoldingItems () { let count = 0 const items = this.bot.inventory.items() - for (const id of this.scafoldingBlocks) { + for (const id of this.scaffoldingBlocks) { for (const j in items) { const item = items[j] if (item.type === id) count += item.count @@ -151,7 +151,7 @@ class Movements { getScaffoldingItem () { const items = this.bot.inventory.items() - for (const id of this.scafoldingBlocks) { + for (const id of this.scaffoldingBlocks) { for (const j in items) { const item = items[j] if (item.type === id) return item diff --git a/readme.md b/readme.md index a1ceb73..3918108 100644 --- a/readme.md +++ b/readme.md @@ -158,7 +158,7 @@ bot.once('spawn', () => { defaultMove.allow1by1towers = false // Do not build 1x1 towers when going up defaultMove.canDig = false // Disable breaking of blocks when pathing - defaultMove.scafoldingBlocks.push(bot.registry.itemsByName['netherrack'].id) // Add nether rack to allowed scaffolding items + defaultMove.scaffoldingBlocks.push(bot.registry.itemsByName['netherrack'].id) // Add nether rack to allowed scaffolding items bot.pathfinder.setMovements(defaultMove) // Update the movement instance pathfinder uses // Do pathfinder things @@ -258,7 +258,7 @@ Set of block id's that are climable. Note: Currently unused as pathfinder cannot Set of block id's that can be replaced when placing blocks. * instance of `Set` -### scafoldingBlocks +### scaffoldingBlocks Array of item id's that can be used as scaffolding blocks. * Default - `[<scaffoldingItems>]`