diff options
author | Nassim Jahnke <[email protected]> | 2023-06-07 21:54:11 +0200 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2023-06-07 21:54:11 +0200 |
commit | 3fed7289ede921a499e314b567977b73d3446d71 (patch) | |
tree | d8ab2f7871fa837f60a6cab99a38d05298d5fa3a /patches/server/0187-Configurable-sprint-interruption-on-attack.patch | |
parent | 94aa4b518af80121327f329ee8101ae3dcf8612b (diff) | |
download | Paper-3fed7289ede921a499e314b567977b73d3446d71.tar.gz Paper-3fed7289ede921a499e314b567977b73d3446d71.zip |
More more more more more work
Diffstat (limited to 'patches/server/0187-Configurable-sprint-interruption-on-attack.patch')
-rw-r--r-- | patches/server/0187-Configurable-sprint-interruption-on-attack.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/server/0187-Configurable-sprint-interruption-on-attack.patch b/patches/server/0187-Configurable-sprint-interruption-on-attack.patch new file mode 100644 index 0000000000..0b1be26726 --- /dev/null +++ b/patches/server/0187-Configurable-sprint-interruption-on-attack.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Brokkonaut <[email protected]> +Date: Sat, 14 Apr 2018 20:20:46 +0200 +Subject: [PATCH] Configurable sprint interruption on attack + +If the sprint interruption is disabled players continue sprinting when they attack entities. + +diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java +index 0bf9425d001660816b36674c2757ec9e85cbd296..f5662c9b8dfd3251be6bf57e7bc13aeb54fe30c2 100644 +--- a/src/main/java/net/minecraft/world/entity/player/Player.java ++++ b/src/main/java/net/minecraft/world/entity/player/Player.java +@@ -1290,7 +1290,11 @@ public abstract class Player extends LivingEntity { + } + + this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D)); +- this.setSprinting(false); ++ // Paper start - Configuration option to disable automatic sprint interruption ++ if (!level.paperConfig().misc.disableSprintInterruptionOnAttack) { ++ this.setSprinting(false); ++ } ++ // Paper end + } + + if (flag3) { |