Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
4c9bdf53ac
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 9d0ad318 Fix javadoc errors in previous commits 9501daa2 #578: Add methods to modify the rate of regeneration and starvation 197d8f3d #577: Add EntityExhaustionEvent CraftBukkit Changes: a021e334 #795: Add methods to modify the rate of regeneration and starvation 509e523c #792: Add EntityExhaustionEvent Spigot Changes: db99f821 Rebuild patches
39 Zeilen
2.0 KiB
Diff
39 Zeilen
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Brokkonaut <hannos17@gmx.de>
|
|
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/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index 48f0385c7203c7955de5a015f3dc42be2ab7b681..cebf1a623a9bec72d60fdd23dda01868ef6431d4 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -358,4 +358,9 @@ public class PaperWorldConfig {
|
|
private void squidMaxSpawnHeight() {
|
|
squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D);
|
|
}
|
|
+
|
|
+ public boolean disableSprintInterruptionOnAttack;
|
|
+ private void disableSprintInterruptionOnAttack() {
|
|
+ disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
index f7da83b0104f7643ad2af2bca2eeb26ac08386ef..c0c8373af47d24a8b9c25a3bebb59b13626a3733 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
@@ -1086,7 +1086,11 @@ public abstract class EntityHuman extends EntityLiving {
|
|
}
|
|
|
|
this.setMot(this.getMot().d(0.6D, 1.0D, 0.6D));
|
|
- this.setSprinting(false);
|
|
+ // Paper start - Configuration option to disable automatic sprint interruption
|
|
+ if (!world.paperConfig.disableSprintInterruptionOnAttack) {
|
|
+ this.setSprinting(false);
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
|
|
if (flag3) {
|