Skip to content

Commit

Permalink
Add back known movement check
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytv committed Jan 12, 2025
1 parent 08ac057 commit 9746d73
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@
}

this.leftOwner = compound.getBoolean("LeftOwner");
@@ -175,13 +_,22 @@
@@ -175,13 +_,25 @@
float f2 = Mth.cos(y * (float) (Math.PI / 180.0)) * Mth.cos(x * (float) (Math.PI / 180.0));
this.shoot(f, f1, f2, velocity, inaccuracy);
Vec3 knownMovement = shooter.getKnownMovement();
+ // Paper start - allow disabling relative velocity
+ if (Double.isNaN(knownMovement.x) || Double.isNaN(knownMovement.y) || Double.isNaN(knownMovement.z)) {
+ knownMovement = new Vec3(0, 0, 0);
+ }
+ if (!shooter.level().paperConfig().misc.disableRelativeProjectileVelocity) {
this.setDeltaMovement(this.getDeltaMovement().add(knownMovement.x, shooter.onGround() ? 0.0 : knownMovement.y, knownMovement.z));
+ }
Expand Down

0 comments on commit 9746d73

Please sign in to comment.