Commit graph

13 commits

Author SHA1 Message Date
BruceChen
ed8e97fd2d Bug fix: /move command went to the wrong location 2022-08-25 14:36:15 +08:00
ORelio
1ce7850193 MC 1.17/1.18 Terrain/Entity/Inventory (#1943)
Merge branch 'master' of github.com:milutinke/Minecraft-Console-Client into milutinke-master

Manually fix merge conflicts
Additional changes:
 - WindowItems: Fix data type for "elements" below 1.17
 - DestroyEntities: Fix packet palettes and remove DestroyEntity
 - EntityMetadata: Throw exception if health field mapping is not updated

Co-authored-by: Milutinke <bgteam@live.com>
Co-authored-by: BruceChen <MrChen131217@gmail.com>
2022-08-19 16:35:55 +02:00
Milutinke
af6f655d5e Fixed the requested changes for Terrain Movement. Tested and working. 2022-08-18 20:58:49 +02: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
BruceChen
b0b45a74a0 Make chunk loading status to be displayed using "/move" command 2022-07-25 14:20:24 +08:00
BruceChen
357820e1c2 Fix bugs in gravity handle 2022-07-25 03:19:24 +08:00
Daenges
b3cc2351ee
CalculatePath: Fix offset calculation, improve approaching (#2013)
* Square minOffset and maxOffset to match DistanceSquared
* Rewrite squaring
* Add minOffset
* Implement h-score selection
2022-05-05 20:05:05 +02:00
Daenges
708815fe61
Improve pathfinding capabilities (#1999)
* Add `ClientIsMoving()` API to determine if currently walking/falling
* Improve `MoveToLocation()` performance and allow approaching location
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2022-04-30 00:56:41 +02:00
Marko von Oppen
8795aab810
Add command to disable Gravity (#1955)
Allow disabling gravity (flying) for servers that allow this.
/move gravity: show gravity handling status
/move gravity on: enable gravity handling (falling)
/move gravity off: disable gravity handling (flying)

Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2022-03-06 19:37:27 +01:00
ORelio
a344ac4101 Implement more realisic fall to ground
Should help moving around in servers using anti-cheat plugins.

See #195
2017-03-10 23:40:02 +01:00
ORelio
71277362be Add timeout when calculating unreachable path
5s timeout, assuming destination is unreachable otherwise.
2015-12-17 17:40:26 +01:00
ORelio
902b04656c Fix pathfinding to coordinates
- Now possible to walk to given coordinates
- Fix sending location before it is received
2015-12-13 21:58:55 +01:00
ORelio
b0c8f82697 Add simple movements with /move command
- Determine if we can move to the specified direction
 - Add moving ability to the specified direction
 - Add /move command for triggering moves
 - Add move decomp. into steps (more natural)
 - Add pathfinding routines (still WIP)
 - SO YES YOU CAN NOW WALK USING MCC!!!
2015-12-12 16:48:38 +01:00