Skip to content
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

resolves issue #6 #3690

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft

resolves issue #6 #3690

wants to merge 14 commits into from

Conversation

rycbar0
Copy link
Contributor

@rycbar0 rycbar0 commented Oct 13, 2022

it took me more then 2 mins and also more then 5 lines of code.

Copy link
Collaborator

@ZacSharp ZacSharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of now MovementParkour, MovementAscend, MovementDescend and MovementFall would walk on magma (because it's canWalkOn now) without pressing shift. Additionally MovementParkour might break when jumping from magma because the damage can prevent the jump. It shouldn't attempt to jump from magma, onto magma is fine as long as no damage is taken.

@rycbar0
Copy link
Contributor Author

rycbar0 commented Oct 18, 2022

should i check if the player wears boots with frost walker enchantment? those also prevent damage from magma blocks without sneaking. if so should i allow pathfinding over magma allways or only when allowSneakOverMagma is true?

@rycbar0 rycbar0 marked this pull request as draft October 18, 2022 21:31
@ZacSharp
Copy link
Collaborator

should i check if the player wears boots with frost walker enchantment? those also prevent damage from magma blocks without sneaking. if so should i allow pathfinding over magma allways or only when allowSneakOverMagma is true?

I'd say just treat magma as a harmless solid block without asking (or add yet another setting for it).

@rycbar0
Copy link
Contributor Author

rycbar0 commented Oct 19, 2022

i understand this that i should remove the allowSneakOverMagma setting and allways allow pathfinding over magma

Copy link
Contributor Author

@rycbar0 rycbar0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO-list:

  • javadoc for isOverMagma()
  • javadoc for hasFrostwalker()
  • adjust jump timing when sneak ascending
  • sneak when breaking a block while standing on magma
  • evaluate optimization potential of costcalculation in MovementDiagonal

@ZacSharp
Copy link
Collaborator

i understand this that i should remove the allowSneakOverMagma setting and allways allow pathfinding over magma

Oh, sorry, that's my comment editing gone wrong. I originally intended to write something along the lines of "I'd say just use the boots without asking (or make it yet another setting)", but obviously I reworded that beyond repair.
As long as it is reliable I don't see a need for a setting (it complicates things after all) and frostwalker boots are 100% reliable.

As for "allowSneakOverMagma": I personally don't care.

Copy link
Collaborator

@ZacSharp ZacSharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To sneak while breaking blocks, Movement.prepared might be the right place.

@ZacSharp
Copy link
Collaborator

Autoformatting caused quite a bunch of unrelated changes but ok.
Code looks good to me now (apart from the todo comment).

It mostly sneaks way to much and not at all after parkour jumps onto magma.

2022-10-30.11-02-13.mp4

Do you think you could make it more like this (but without sneaking too little)?

2022-10-30.11-21-36.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants