title: Mineflayer (minecraft-data;pathfinder): Cannot read properties of undefined
body: <p>So I´ve been trying to make a bot that followes my Minecraft character <code>(playerCI = bot.players[&quot;Cyberyes&quot;])</code>, but when I try to start it, I get this error:</p>
  <blockquote>
  <p>Starting...
  C:\Users\Jakob\Documents\Minecraft\Bot\FirstBot\node_modules\mineflayer-pathfinder\lib\movements.js:35
  this.blocksCantBreak.add(mcData.blocksByName.chest.id)
  ^</p>
  <p>TypeError: Cannot read properties of undefined (reading
  'blocksByName')
  at new Movements (C:\Users\Jakob\Documents\Minecraft\Bot\FirstBot\node_modules\mineflayer-pathfinder\lib\movements.js:35:37)
  at EventEmitter.followPlayer (C:\Users\Jakob\Documents\Minecraft\Bot\FirstBot\main.js:28:23)
  at Object.onceWrapper (node:events:509:28)
  at EventEmitter.emit (node:events:402:35)
  at Client. (C:\Users\Jakob\Documents\Minecraft\Bot\FirstBot\node_modules\mineflayer\lib\plugins\health.js:13:11)
  at Object.onceWrapper (node:events:510:26)
  at Client.emit (node:events:402:35)
  at FullPacketParser. (C:\Users\Jakob\Documents\Minecraft\Bot\FirstBot\node_modules\minecraft-protocol\src\client.js:91:12)
  at FullPacketParser.emit (node:events:390:28)
  at addChunk (C:\Users\Jakob\Documents\Minecraft\Bot\FirstBot\node_modules\readable-stream\lib_stream_readable.js:298:12)</p>
  </blockquote>
  <p>This is my Code:</p>
  <pre><code>console.log(&quot;Starting...&quot;)
  
  const mineflayer = require('mineflayer')
  const { pathfinder, Movements, goals } = require('mineflayer-pathfinder')
  const GoalFollow = goals.GoalFollow
  
  
  var settings = {
      username: &quot;Bot&quot;,
      host: &quot;185.245.96.138&quot;,
      port: &quot;25592&quot;,
      version: &quot;1.16.5&quot;,
      }
  
  const bot = mineflayer.createBot(settings)
  bot.loadPlugin(pathfinder)
  
  function followPlayer() {
      const playerCI = bot.players['Cyberyes']
  
      if (!playerCI || !playerCI.entity) {
          bot.chat(&quot;I can't see Cyberyes!&quot;)
          return
      }
  
  
      const mcData = require('minecraft-data')(bot.version)
      const movements = new Movements(bot, mcData)
      bot.pathfinder.setMovements(movements)
  
      const goal = new GoalFollow(playerCI.entity, 1)
      bot.pathfinder.setGoal(goal, true)
  }
  
  bot.once(&quot;spawn&quot;, followPlayer)
  </code></pre>