geforkt von Mirrors/Paper
19b4f78b55
Replaces the "use-chunk-inhabited-timer" config option with the options "use-fixed-chunk-inhabited-time" and "fixed-chunk-inhabited-time". When using "use-fixed-chunk-inhabited-time=false" everything will be the same like it was with "use-chunk-inhabited-timer=true". When using "use-fixed-chunk-inhabited-time=true" and "fixed-chunk-inhabited-time=0" everything will be the same like it was with "use-chunk-inhabited-timer=false". Instead of just using 0 when all chunks should be treated equally this allows to fine-tune vanilla gameplay.
42 Zeilen
1.9 KiB
Diff
42 Zeilen
1.9 KiB
Diff
From 25155c9ec86274414859937728b50d961386a7fd 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 56226bc86..6bb54fcbd 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -414,4 +414,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 507641fc6..2bab2ab92 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
@@ -1084,7 +1084,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.20.0
|
|
|