mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Fix rounding related errors with small entity pathfinding. Closes #7730
This commit is contained in:
1 parent
3e9e0a6447
commit
4bdfd8674d
1 file changed
+4
-2
+4
-2
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
+++ b/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
@@ -223,9 +_,9 @@
|
||||
@@ -223,10 +_,10 @@
|
||||
Vec3 vec3 = this.m_7475_();
|
||||
this.f_26505_ = this.f_26494_.m_20205_() > 0.75F ? this.f_26494_.m_20205_() / 2.0F : 0.75F - this.f_26494_.m_20205_() / 2.0F;
|
||||
Vec3i vec3i = this.f_26496_.m_77400_();
|
||||
@@ -8,7 +8,9 @@
|
||||
+ double d0 = Math.abs(this.f_26494_.m_20185_() - ((double)vec3i.m_123341_() + (this.f_26494_.m_20205_() + 1) / 2D)); //Forge: Fix MC-94054
|
||||
double d1 = Math.abs(this.f_26494_.m_20186_() - (double)vec3i.m_123342_());
|
||||
- double d2 = Math.abs(this.f_26494_.m_20189_() - ((double)vec3i.m_123343_() + 0.5D));
|
||||
- boolean flag = d0 < (double)this.f_26505_ && d2 < (double)this.f_26505_ && d1 < 1.0D;
|
||||
+ double d2 = Math.abs(this.f_26494_.m_20189_() - ((double)vec3i.m_123343_() + (this.f_26494_.m_20205_() + 1) / 2D)); //Forge: Fix MC-94054
|
||||
boolean flag = d0 < (double)this.f_26505_ && d2 < (double)this.f_26505_ && d1 < 1.0D;
|
||||
+ boolean flag = d0 <= (double)this.f_26505_ && d2 <= (double)this.f_26505_ && d1 < 1.0D; //Forge: Fix MC-94054
|
||||
if (flag || this.f_26494_.m_21481_(this.f_26496_.m_77401_().f_77282_) && this.m_26559_(vec3)) {
|
||||
this.f_26496_.m_77374_();
|
||||
}
|
||||
Reference in new issue
Block a user