Fixed vanilla bug in entity navigation to stop entities spinning (MC-94054) (#6091)
This commit is contained in:
parent
ff7a2fe4d6
commit
1ebfef5ec9
2 changed files with 24 additions and 0 deletions
|
@ -0,0 +1,12 @@
|
|||
--- a/net/minecraft/pathfinding/PathNavigator.java
|
||||
+++ b/net/minecraft/pathfinding/PathNavigator.java
|
||||
@@ -195,7 +195,8 @@
|
||||
Vec3d vec3d = this.func_75502_i();
|
||||
this.field_188561_o = this.field_75515_a.func_213311_cf() > 0.75F ? this.field_75515_a.func_213311_cf() / 2.0F : 0.75F - this.field_75515_a.func_213311_cf() / 2.0F;
|
||||
Vec3d vec3d1 = this.field_75514_c.func_186310_f();
|
||||
- if (Math.abs(this.field_75515_a.field_70165_t - (vec3d1.field_72450_a + 0.5D)) < (double)this.field_188561_o && Math.abs(this.field_75515_a.field_70161_v - (vec3d1.field_72449_c + 0.5D)) < (double)this.field_188561_o && Math.abs(this.field_75515_a.field_70163_u - vec3d1.field_72448_b) < 1.0D) {
|
||||
+ // Forge: fix MC-94054
|
||||
+ if (Math.abs(this.field_75515_a.field_70165_t - (vec3d1.field_72450_a + (this.field_75515_a.func_213311_cf() + 1) / 2D)) < (double)this.field_188561_o && Math.abs(this.field_75515_a.field_70161_v - (vec3d1.field_72449_c + (this.field_75515_a.func_213311_cf() + 1) / 2D)) < (double)this.field_188561_o && Math.abs(this.field_75515_a.field_70163_u - vec3d1.field_72448_b) < 1.0D) {
|
||||
this.field_75514_c.func_75872_c(this.field_75514_c.func_75873_e() + 1);
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
--- a/net/minecraft/pathfinding/SwimmerPathNavigator.java
|
||||
+++ b/net/minecraft/pathfinding/SwimmerPathNavigator.java
|
||||
@@ -68,7 +68,8 @@
|
||||
|
||||
int i = 6;
|
||||
Vec3d vec3d2 = this.field_75514_c.func_186310_f();
|
||||
- if (Math.abs(this.field_75515_a.field_70165_t - (vec3d2.field_72450_a + 0.5D)) < (double)f1 && Math.abs(this.field_75515_a.field_70161_v - (vec3d2.field_72449_c + 0.5D)) < (double)f1 && Math.abs(this.field_75515_a.field_70163_u - vec3d2.field_72448_b) < (double)(f1 * 2.0F)) {
|
||||
+ // Forge: fix MC-94054
|
||||
+ if (Math.abs(this.field_75515_a.field_70165_t - (vec3d2.field_72450_a + (this.field_75515_a.func_213311_cf() + 1) / 2D)) < (double)f1 && Math.abs(this.field_75515_a.field_70161_v - (vec3d2.field_72449_c + (this.field_75515_a.func_213311_cf() + 1) / 2D)) < (double)f1 && Math.abs(this.field_75515_a.field_70163_u - vec3d2.field_72448_b) < (double)(f1 * 2.0F)) {
|
||||
this.field_75514_c.func_75875_a();
|
||||
}
|
||||
|
Loading…
Reference in a new issue