geforkt von Mirrors/Paper
2f782a6652
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes:17543ecf
SPIGOT-5035: Error Using Virtual Merchant GUI0fc6922b
SPIGOT-5028: Villager#setVillagerExperience() doesn't workbdbdbe44
SPIGOT-5024: Fox error - Unknown target reason
42 Zeilen
1.9 KiB
Diff
42 Zeilen
1.9 KiB
Diff
From 1c4c70cee0e81953eaa61302ec08a5e480674be2 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 32bfe0e462..7024336c3a 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -354,4 +354,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 f4f1037b3d..9abdf8b24b 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
@@ -1030,7 +1030,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) {
|
|
--
|
|
2.21.0
|
|
|