Commit graph

6 commits

Author SHA1 Message Date
BruceChen
892999ac98 Merge into master 2022-12-06 20:32:46 +08:00
BruceChen
ef39e8329c [SKIP_BUILD] Change file encoding to UTF-8 with BOM 2022-11-28 13:55:05 +08:00
BruceChen
077e3a5e9f
Crowdin localization support (#2310)
* Switching to use resource files

* Update Crowdin configuration file

* Code cleanup
2022-10-28 11:13:20 +08:00
BruceChen
eb51f72fb8 Update config\ChatBots 2022-10-18 10:02:43 +08:00
Daenges
aa1f54d0d8
Rework of MineCube.cs and further improvements to CalculatePath() (#2014)
* Add function to determine if the client is executing a walking process
* Add comments
* Remove test bot entry
* Add funtion to approach a block as close as possible
* Add funtion to approach a block as close as possible
* Add funtion to approach a block as close as possible
* Add comment to function in McClient.cs
* Improve concurrency and reduce potential calculation power
* Apply code suggestions
* Apply code suggestions
* Improve CalculatePath() function to allow approaching
* Fix typo in MinecraftClient/ChatBot.cs
* Add comments to Chatbot fucntion
* Add break to for loop to exit quicker
* Allow to give a maxOffset to the goal
* Comment the sample bot again.
* Add parameter for calculation timeout
* Remove TestBot again
* Implement timeout in Chatbot class
* Remove test commands
* Update comment in Chatbot.cs
* Set timeout to default 5 sec
* Change order of parameters back
* Add suggested improvements
* Move task and fix missing methods in .NET 4.0
* Create switch for tool handling
* Remove unused function
* Improve movement
* Improve performance of CalculatePath()

 - Replace Hashset OpenSet with a Binary Heap
  - Temporary remove maxOffset / minOffset features
 - Round start location for easier calculation
 - Add 0.5 to each location in reconstruct path to avoid getting stuck
    on edges

* Add diagonal movement
* Remove direct block movement
- causes kick for invalid packet movement if moving on the block you are
  currently standing on

* Floor start in A* and improve diagonal walking check
* Add helperfunctions to McClient.cs
* Prevent client from falling into danger
* Add comment to function and remove dependencies
* Add comments
* Remove debug settings

Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2022-08-15 18:26:40 +02:00
Daenges
b3b9a26288
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>
2021-08-03 13:25:43 +08:00