-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrated pre-hard-fork patch 0020-fix-NaN-delta-movement.patch
- Loading branch information
1 parent
5380f5e
commit 2dc462d
Showing
2 changed files
with
16 additions
and
24 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
...atches/sources/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- a/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java | ||
+++ b/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java | ||
@@ -84,6 +_,13 @@ | ||
this.igniteForSeconds(1.0F); | ||
} | ||
|
||
+ // Cheetah start - fix NaN delta movement | ||
+ final Vec3 deltaMovement = this.getDeltaMovement(); | ||
+ if (Double.isNaN(deltaMovement.x) && Double.isNaN(deltaMovement.y) && Double.isNaN(deltaMovement.z)) { | ||
+ this.setDeltaMovement(Vec3.ZERO); | ||
+ } | ||
+ // Cheetah end - fix NaN delta movement | ||
+ | ||
if (hitResultOnMoveVector.getType() != HitResult.Type.MISS && this.isAlive()) { | ||
this.preHitTargetOrDeflectSelf(hitResultOnMoveVector); // CraftBukkit - projectile hit event | ||
} |
This file was deleted.
Oops, something went wrong.