New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any way to break blocks? #305
Comments
Breaking blocks in the world isn't currently supported if I recall correctly. |
The block I would need to break is sugarcane, so I believe its pretty simple just one block break packet or something, or is sugarcane the same as all the other blocks? |
Sugar cane (and other instant-minable blocks) should just be one packet (I think, might be 2 still; the packet is complicated and has several states); it's just that none of the infrastructure to send block break packets has been written yet (so it's not easilly accessible to scripts). |
@Pokechu22 How much work would it be to add this in? Pretty much I'm trying to make a bot run around a sugar cane farm breaking the cane... The walking part I think i have handled but the breaking is the part I'm stuck on. |
Hello, The main issue with block breaking/placing is that #205 would need to be implemented first. Of course, breaking a block does not necessarily requires handling inventory, but handling inventory would allow selecting the right tool to break the block. Breaking block could be implemented separately if you need it, but to do it properly, digging times would need to be implemented, also the player head would need to be rotated to look at the target block. Failing to implement head movements and digging times would trigger anti-cheat plugins on many servers. Also, the necessary bot API method(s) would need to be added in order to enable bots to break blocks :) Breaking sugar cane is simple indeed as no block break delay is necessary, still, it requires at least looking at the sugar cane and sending the packet. Plus some testing, I guess. So the necessary work would be the following: 1/ Implement ability to look at specific block coordinates (compute & send packet) There are lots of "would" in this message as I'm not having enough time to work on all of this myself at the moment, I can however provide guidance if you are willing to contribute to the project 🙂 |
Hi thanks for the issue, |
Hey, im interested in seeing if there is any way to break blocks, probably I would use a C# Script... Im somewhat new to coding and dont really understand how everything works but Im sure if I get pointed in the right direction then I'll be able to figure it out
The text was updated successfully, but these errors were encountered: