Skip to content

A few errors that I've run into (w/ error messages) #42

@Ryah

Description

@Ryah

## Specs: Node Version: v6.9.5
Server Version: CraftBukkit 1.11.2
OS: ElementaryOS Loki (based off of Ubuntu 16.04).

I finally got the bot working, but there are a few crashes that I've run into. Here are the commands I've done and the error codes that comes with them. I can provide a video if needed:

1) Anything building related only places one block and then freezes:

For a test, I placed 6 blocks down with the bot watching me, then stopped watching and asked for it to replicate. It placed down one block, but outputted this to the terminal. It never displayed any chat messages about it completing the replicate task.

replicate
["replicate",[]]
I'm going to achieve task ["replicate",[]]
do build r-1,0,-4 then build r0,0,-4 then build r1,0,-4 then build r-2,0,-4 then dig r-2,0,-4 then dig r-1,0,-4 then dig r0,0,-4 done
["taskList",[["taskList",[["exp",["build",[["position","r-1,0,-4"]]]],["exp",["build",[["position","r0,0,-4"]]]],["exp",["build",[["position","r1,0,-4"]]]],["exp",["build",[["position","r-2,0,-4"]]]],["exp",["dig",[["position","r-2,0,-4"]]]],["exp",["dig",[["position","r-1,0,-4"]]]],["exp",["dig",[["position","r0,0,-4"]]]]]]]]
I'm going to achieve task ["taskList",[["taskList",[["exp",["build",[["position","r-1,0,-4"]]]],["exp",["build",[["position","r0,0,-4"]]]],["exp",["build",[["position","r1,0,-4"]]]],["exp",["build",[["position","r-2,0,-4"]]]],["exp",["dig",[["position","r-2,0,-4"]]]],["exp",["dig",[["position","r-1,0,-4"]]]],["exp",["dig",[["position","r0,0,-4"]]]]]]]]
I'm going to achieve task ["build",[["position","r-1,0,-4"]]]
I achieved task ["build",[["position","r-1,0,-4"]]]
I'm going to achieve task ["build",[["position","r0,0,-4"]]]
I achieved task ["build",[["position","r0,0,-4"]]]
I'm going to achieve task ["build",[["position","r1,0,-4"]]]
I achieved task ["build",[["position","r1,0,-4"]]]
I'm going to achieve task ["build",[["position","r-2,0,-4"]]]
I achieved task ["build",[["position","r-2,0,-4"]]]
I'm going to achieve task ["dig",[["position","r-2,0,-4"]]]
I achieved task ["dig",[["position","r-2,0,-4"]]]
I'm going to achieve task ["dig",[["position","r-1,0,-4"]]]
I achieved task ["dig",[["position","r-1,0,-4"]]]
I'm going to achieve task ["dig",[["position","r0,0,-4"]]]
I achieved task ["dig",[["position","r0,0,-4"]]]
I achieved task ["taskList",[["taskList",[["exp",["build",[["position","r-1,0,-4"]]]],["exp",["build",[["position","r0,0,-4"]]]],["exp",["build",[["position","r1,0,-4"]]]],["exp",["build",[["position","r-2,0,-4"]]]],["exp",["dig",[["position","r-2,0,-4"]]]],["exp",["dig",[["position","r-1,0,-4"]]]],["exp",["dig",[["position","r0,0,-4"]]]]]]]]
I achieved task ["replicate",[]]

2) build shelter, replicate, or anything that has to do with building on Snow

/home/unity/rbot/node_modules/minecraft-protocol/dist/transforms/framing.js:112
          } else throw e;
                 ^

Error: No block has been placed : the block is still air
    at Bot.onBlockUpdate (/home/unity/rbot/node_modules/mineflayer/lib/plugins/inventory.js:367:14)
    at emitTwo (events.js:106:13)
    at Bot.emit (events.js:191:7)
    at emitBlockUpdate (/home/unity/rbot/node_modules/mineflayer/lib/plugins/blocks.js:110:22)
    at updateBlock (/home/unity/rbot/node_modules/mineflayer/lib/plugins/blocks.js:129:5)
    at Client.<anonymous> (/home/unity/rbot/node_modules/mineflayer/lib/plugins/blocks.js:187:5)
    at emitTwo (events.js:106:13)
    at Client.emit (events.js:191:7)
    at Parser.<anonymous> (/home/unity/rbot/node_modules/minecraft-protocol/dist/client.js:101:16)
    at emitOne (events.js:96:13)
    at Parser.emit (events.js:188:7)

3) down (or anything that involves breaking blocks) (temporary fix is to comment out lines 17-50 and 96 in /lib/Inventory.js and also comment out line 146 in /lib/stringTo.js):

/home/unity/rbot/lib/inventory.js:18
    var okTools = block.harvestTools;
                       ^

TypeError: Cannot read property 'harvestTools' of undefined
    at canHarvest (/home/unity/rbot/lib/inventory.js:18:24)
    at Object.toolToBreak (/home/unity/rbot/lib/inventory.js:31:7)
    at stringToItem (/home/unity/rbot/lib/stringTo.js:146:76)
    at item (/home/unity/rbot/lib/stringTo.js:21:38)
    at /home/unity/rbot/lib/stringTo.js:39:119
    at /home/unity/rbot/node_modules/async/lib/async.js:356:13
    at async.forEachOf.async.eachOf (/home/unity/rbot/node_modules/async/lib/async.js:233:13)
    at _asyncMap (/home/unity/rbot/node_modules/async/lib/async.js:355:9)
    at Object.map (/home/unity/rbot/node_modules/async/lib/async.js:337:20)
    at Object.stringTo (/home/unity/rbot/lib/stringTo.js:39:8)

4) come command just doesn't work. Bot says it accomplished task but doesn't move.

5) Anything with the repeat command just repeats a blank command over and over until I force kill the bot.

6) get block (grass in this case):

/home/unity/rbot/lib/nearest.js:39
	return blocks[blockName].id;
	                        ^

TypeError: Cannot read property 'id' of undefined
    at blockNameToBlockType (/home/unity/rbot/lib/nearest.js:39:26)
    at Object.nearestBlock (/home/unity/rbot/lib/nearest.js:84:17)
    at stringToBlock (/home/unity/rbot/lib/stringTo.js:44:68)
    at stringToAbsolutePosition (/home/unity/rbot/lib/stringTo.js:105:2)
    at stringToPosition (/home/unity/rbot/lib/stringTo.js:121:7)
    at stringToPosition (/home/unity/rbot/lib/stringTo.js:118:72)
    at /home/unity/rbot/lib/stringTo.js:39:119
    at /home/unity/rbot/node_modules/async/lib/async.js:356:13
    at async.forEachOf.async.eachOf (/home/unity/rbot/node_modules/async/lib/async.js:233:13)
    at _asyncMap (/home/unity/rbot/node_modules/async/lib/async.js:355:9)

7) toss command doesn't drop anything but the bot still thinks it completed the command (I think the bot can't see it's inventory?)

I'll update this issue if I find more errors and/or temporary fixes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions