From 3969291a8cbb9fc26b15c5378ead66c231cd48c0 Mon Sep 17 00:00:00 2001 From: gsand Date: Sun, 22 Jun 2014 15:42:43 -0500 Subject: [PATCH] Configurable hunger multiplier for player sprint jumping --- ...ger-multiplier-for-player-sprint-jum.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 CraftBukkit-Patches/0160-Configurable-hunger-multiplier-for-player-sprint-jum.patch diff --git a/CraftBukkit-Patches/0160-Configurable-hunger-multiplier-for-player-sprint-jum.patch b/CraftBukkit-Patches/0160-Configurable-hunger-multiplier-for-player-sprint-jum.patch new file mode 100644 index 0000000..8a8dd35 --- /dev/null +++ b/CraftBukkit-Patches/0160-Configurable-hunger-multiplier-for-player-sprint-jum.patch @@ -0,0 +1,39 @@ +From a53cc29dc790badee0ec822a06a388365404b22a Mon Sep 17 00:00:00 2001 +From: gsand +Date: Tue, 15 Apr 2014 18:00:02 -0700 +Subject: [PATCH] Configurable hunger multiplier for player sprint jumping + + +diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java +index f50dcf5..a645b1e 100644 +--- a/src/main/java/net/minecraft/server/EntityHuman.java ++++ b/src/main/java/net/minecraft/server/EntityHuman.java +@@ -1250,7 +1250,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen + super.bi(); + this.a(StatisticList.r, 1); + if (this.isSprinting()) { +- this.a(0.8F); ++ this.a( SpigotWorldConfig.playerSprintJumpingHungerMultiplier ); // PaperSpigot - Configurable hunger multiplier for player sprint jumping + } else { + this.a(0.2F); + } +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index 20a1189..c6095f2 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -355,6 +355,12 @@ public class SpigotWorldConfig + playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F ); + } + ++ public static float playerSprintJumpingHungerMultiplier; ++ private void setPlayerSprintJumpingHungerMultiplier() ++ { ++ playerSprintJumpingHungerMultiplier = getFloat( "player-sprint-jumping-hunger-multiplier", 0.8F ); ++ } ++ + public static double babyZombieMovementSpeed; + private void setBabyZombieMovementSpeed() + { +-- +1.9.1 +