Closed Nekiplay closed 4 years ago
About that, I'm wondering if we could automate the dig block mechanism to avoid managing the "dig start" / "dig end" stuff manually in the bots, which is not intuitive. I'm thinking that we would need to determine how long we need to dig for a block, then dig automatically, and send a "dig end" event to the ChatBot which could then move on to the next block, for instance.
It’s necessary to somehow track the block in front of the player
it seems to me better to create like Nuker for a certain type of block
Ok, so according to https://wiki.vg/How_to_Write_a_Client#Digging we might be able to send "dig start" then immediately "dig end" then wait for "Acknowledge Player Digging" or "Block Change" from server.
Now add it
In that case please wait before working on a new pull request.
Heh, with this code, it breaks the block but not to the end and it does not drop out
Fixed But it's still not what you need
Please note that if we're both working on the same code, we won't be able to merge properly. At the moment I'm also attempting to implement that.
this requires a cycle that determines that the unit is not air
Weird. On my side I have something very similar and it's not breaking anything. Still looking at it.
Perhaps the distance to the block is large, I have everything on 1.12.2, 1.15.2 everything is fine
I'm standing right in front of the block, and even compared "dig block" packets sent by a vanilla 1.15.2 with packet sent by MCC, they're the same. I pushed the commit so you can look at it.
Well, at least you have the idea of what I had in mind: leave only the "location" parameter and let McClient handle the complicated part so chatbot and command only need to tell which block they want the client to break. I'll stop editing the code for now.
Heh, with this code, it breaks the block but not to the end and it does not drop out
Yup, if you send dig start but never send dig end, you can run the dig animation forever :D
Prerequisites
debugmessages=true
in config to diagnose my issueBug description