activateBlock
doesn't do anything
#3428
Labels
possible bug
Stage1
just created by someone new to the project, we don't know yet if it deserves an implementation / a f
Versions
Detailed description of a problem
I am making a bot that can MLG with a water bucket. It does so just fine, but the problem is picking up the water it left behind. Right now I'm just having it
lookAt
the water source, then callingactivateItem
while holding the bucket. This works 90% of the time, but 10% of the time thewater_flowing
blocks wash it away before it can pick up the water because, for some reason, the bot looks in the direction of its motion (i.e. away from the source block).What did you try yet?
To solve this, I wanted to use the
activateBlock
method while holding the bucket. I thought this would be more precise than my previous approach. Problem is, the method doesn't seem to do anything. I've tested it with water sources (while holding a bucket), fence gates, levers. In all cases, the bot seems to just turn towards the block in question and wave its arm as if it "activated" it, but nothing happens.I suppose this is an XY problem since my real problem is reliably picking up water source blocks (X), but solving the
activateBlock
problem (Y) would work too.Your current code
Here is the code I used to test this:
It just searches for the closest block types in chat and activates it. For water, you would just type 'water' in chat.
Expected behavior
The
activateBlock
method should do... something?Additional Context
There is another issue from 2020, #1262, which deals with a similar issue, but it seems to fix it by "adding a delay" I'm not sure where. It also references a callback parameter in the
activateBlock
function which seems to longer exist.The text was updated successfully, but these errors were encountered: