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

Fix ClimberPathNavigator spinning when width is small. Closes #6993 #6997

Merged
merged 2 commits into from Jul 27, 2020

Conversation

Yunus1903
Copy link
Contributor

@Yunus1903 Yunus1903 commented Jul 19, 2020

This PR is a fix (also kind of a hack) for #6993

Entities using ClimberPathNavigator (like a spider) keep spinning at the end of their path navigation when their width is 0.9 or smaller.
This PR makes sure when their width is checked for navigation that the width is never lower then 1.

.withinDistance(this.entity.getPositionVec(), (double)this.entity.getWidth())
is now
.withinDistance(this.entity.getPositionVec(), Math.max((double)this.entity.getWidth(), 1.0D))

@ichttt ichttt added 1.16 Vanilla Bug This request fixes or reports a bug that exists in the base Minecraft game. labels Jul 20, 2020
@ichttt ichttt added the Assigned This request has been assigned to a core developer. Will not go stale. label Jul 20, 2020
@LexManos
Copy link
Member

This isn't a proper fix, it should actually make the target position a Vec2D set to the center of the block, or the specific point it's trying to get to. If that was indeed the case then the bug would be gone. But sure, this fixes it within an acceptable margin of error.

@LexManos LexManos merged commit fba1680 into MinecraftForge:1.16.x Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.16 Assigned This request has been assigned to a core developer. Will not go stale. Vanilla Bug This request fixes or reports a bug that exists in the base Minecraft game.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants