mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 04:09:54 +01:00
05466e3b47
Upstream has released updates that appear to apply compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing. Bukkit Changes: d2834556 SPIGOT-4219: Event for PigZombies angering. CraftBukkit Changes:a9c796f1
SPIGOT-4184: Fix furnaces not matching Vanilla smelt or animations195f071e
SPIGOT-4219: Event for PigZombies angering.5e3082c7
SPIGOT-4230: Improve legacy block types
42 lines
1.9 KiB
Diff
42 lines
1.9 KiB
Diff
From bf1f15f2a196b2a87d6e0c8601a472090be4fceb 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 2ce60eb05d..9daa8f66a1 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -398,4 +398,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 55c45973e1..015cd553dd 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
@@ -1073,7 +1073,11 @@ public abstract class EntityHuman extends EntityLiving {
|
|
|
|
this.motX *= 0.6D;
|
|
this.motZ *= 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.18.0
|
|
|