mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-18 23:23:19 +01:00
Add back known movement check
This commit is contained in:
parent
08ac057fda
commit
9746d73ade
1 changed files with 4 additions and 1 deletions
|
@ -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));
|
||||
+ }
|
||||
|
|
Loading…
Reference in a new issue