Add script for excavating cubes (#1677)

* Add MineCube.cs

* Clear unused comments and using directives

* Move the command to a chatbot class

* Set a maximum sleep time for block mining

* Add tool selection function

* Improve the block - tool detection

* Improve naming and comments

* Add missing blocktypes

* Add block-tool assertion and tool switching in hotbar

* Remove unused using declaratives and improve coordinate handling

* Move Material2Tool in the Mapping folder

* Add function to let the bot mine up to 5 blocks above its head

* Remove obsolete function to detect breakability

* Implement mineup command
Users can dig out a 2 high square manually. The client will walk through it
mining everything that is reachable above, while avoiding falling blocks and liquids.

* Refactor big parts of the code
Move the function for obtaining cubes to a seperate file.
Sort Unbreakables alphabetically.
Change the distance to wait in the mine function back to 2.

* Fix suggestions from review
Change several parts of the code according to the review
Add credits

* Convert the bot into a script file and move it to config folder
Adjust the script to be loadable with /script
Remove unnecessary code
Add public modifier to material2tool

* Add checking for lava and water for normal mining

* Remove MineCube.cs from chatbots

* Code re-format

Rename variables
Fix indentation

Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>
This commit is contained in:
Daenges 2021-08-03 07:25:43 +02:00 committed by GitHub
parent 349a3de8e4
commit b3b9a26288
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1187 additions and 0 deletions

View file

@ -75,6 +75,8 @@
<Compile Include="AutoTimeout.cs" />
<Compile Include="ChatBots\AutoDrop.cs" />
<Compile Include="ChatBots\Mailer.cs" />
<Compile Include="Mapping\CubeFromWorld.cs" />
<Compile Include="Mapping\Material2Tool.cs" />
<Compile Include="ChatBots\ReplayCapture.cs" />
<Compile Include="Commands\DropItem.cs" />
<Compile Include="Commands\Entitycmd.cs" />