mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
654b792caf
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:a339310c
#755: Fix NPE when calling getInventory() for virtual EnderChests2577f9bf
Increase outdated build delay1dabfdc8
#754: Fix pre-1.16 serialized SkullMeta being broken on 1.16+, losing textures
39 lines
2.0 KiB
Diff
39 lines
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 3804c7cf96087cdf94fd5fbdce4ebcdafa9e0019..873f81c74a94f6d76edd45e34ddc476dc525b47c 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -351,4 +351,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 49f051a1f47c73a66cc462b3eecf72c4e932b648..9a55d1e6f4c6632c1f27d8c1fac55abc3c3d8204 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) {
|