Compare commits

...

4 Commits

Author SHA1 Message Date
jay eae4e95803 Merge branch 'nogameplay' into master 3 years ago
jay fb066ee8a5 refactor: ♻️ use array in pathfinder movements list 3 years ago
jay f4445749e6 fix: ✏️ add missing plugin name 3 years ago
jay bf45a53f08 refactor: remove gameplay 3 years ago
  1. 2
      lib/index.js
  2. 8
      lib/plugins/mover.js
  3. 2
      lib/plugins/sleeper.js
  4. 1
      package.json

@ -99,7 +99,7 @@ bot.once("spawn", () => {
inventory: require('./plugins/inventory'),
eater: require('./plugins/eater'),
finder: require('./plugins/finder'),
miner: require('./plugins/miner'),
// miner: require('./plugins/miner.js'),
// statemachine: require('./plugins/statemachine'),
}

@ -16,12 +16,18 @@ let movements = []
function initMoves(bot = bot, mcData = require('minecraft-data')(bot.version)) {
console.info(movements)
if (movements.length > 0) {
bot.pathfinder.setMovements(defaultMove)
return console.warn("movements already initialized!")
}
let defaultMove = new Movements(bot, mcData)
defaultMove.canDig = false
defaultMove.scafoldingBlocks.push(mcData.blocksByName.slime_block.id)
// defaultMove.blocksCantBreak.add(mcData.blocksByName.glass.id)
// defaultMove.blocksToAvoid.add(mcData.blocksByName.magma.id)
movements.defaultMove = defaultMove
movements.push(defaultMove)
movements.defaultMove = movements[0]
bot.pathfinder.setMovements(defaultMove)
}

@ -27,7 +27,7 @@ function sleep(quiet) {
if (bed && bedstatus == "") {
bot.lookAt(bed.position)
bot.waitForChunksToLoad(() => {
cfg.plugins.moveNear(bed.position)
cfg.plugins.mover.moveNear(bed.position)
bot.sleep(bed, (err) => {
if (err) {
!quiet && bot.chat(`can't sleep: ${err.message}`)

@ -42,7 +42,6 @@
"prismarine-block": "^1",
"prismarine-chat": "^1",
"prismarine-entity": "^1.1.0",
"prismarine-gameplay": "github:TheDudeFromCI/prismarine-gameplay#crafting",
"prismarine-item": "^1.5.0",
"prismarine-nbt": "^1.3",
"prismarine-recipe": "^1",

Loading…
Cancel
Save