mirror of
https://github.com/PaperMC/Paper.git
synced 2025-04-09 15:43:02 +02:00
35 lines
No EOL
1.7 KiB
Diff
35 lines
No EOL
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: gsand <gsandowns@gmail.com>
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|
super.bi();
|
|
this.a(StatisticList.r, 1);
|
|
if (this.isSprinting()) {
|
|
- this.a(0.8F);
|
|
+ this.a(PaperSpigotWorldConfig.playerSprintJumpingHungerMultiplier); // PaperSpigot - Configurable hunger multiplier for player sprint jumping
|
|
} else {
|
|
this.a(0.2F);
|
|
}
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig
|
|
{
|
|
babyZombieMovementSpeed = getDouble( "baby-zombie-movement-speed", 0.5D );
|
|
}
|
|
+
|
|
+ public static float playerSprintJumpingHungerMultiplier;
|
|
+ private void playerSprintJumpingHungerMultiplier()
|
|
+ {
|
|
+ playerSprintJumpingHungerMultiplier = getFloat( "player-sprint-jumping-hunger-multiplier", 0.8F );
|
|
+ }
|
|
}
|
|
--
|