From 2f95e1a840809a846b5b619fe8ed69102d660ddb Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Sun, 17 Aug 2014 16:47:36 -0500 Subject: [PATCH] Update from upstream SpigotMC Fix empty `ench` tags being wiped by the meta system SpigotMC/Spigot@cc9a1a417f1ac95a7957db8636e31c8fc2baf4e9 Add Hunger Config Values SpigotMC/Spigot@2cd515e2241947e3f9a11d6975c2d657360f7acd Make debug logging togglable SpigotMC/Spigot@d31b1d616fe2c16bd3609d6f632826e05bc505e9 Spigot has implemented a system of hunger exhaustion similar to ours, as such a lot of config values have been moved there. Our exhaustion patch has been trimmed and only a few values for exhaustion remain in paper.yml, the others now sit in spigot.yml --- ... => 0163-Alternative-Hopper-Ticking.patch} | 0 ...163-Log-debug-levels-to-the-log-file.patch | 28 ------ ...Apply-NBTReadLimiter-to-more-things.patch} | 0 ...tch => 0165-Allow-Attribute-Capping.patch} | 0 ...-a-global-cache-for-any-request-on-.patch} | 0 ...fetch-an-online-UUID-in-online-mode.patch} | 0 ...modifiers-which-cause-the-attribute.patch} | 0 ...ed-diff-from-Minecraft-1.3.1-update.patch} | 0 ..._AIR-detection-when-not-in-creative.patch} | 0 ...h => 0171-Plug-WorldMap-Memory-Leak.patch} | 0 ... 0172-Force-Close-Inventory-On-Move.patch} | 0 ...=> 0173-Fix-Corrupted-Trapped-Chest.patch} | 0 .../0174-Remove-uneeded-validation.patch | 36 ++++++++ .../0175-Add-Hunger-Config-Values.patch | 66 ++++++++++++++ .../0176-Make-debug-logging-togglable.patch | 65 ++++++++++++++ ...-despawn-distances-for-living-entiti.patch | 4 +- .../Don-t-log-debug-information.patch | 33 ------- .../Player-Exhaustion-Multipliers.patch | 88 ++++--------------- 18 files changed, 184 insertions(+), 136 deletions(-) rename CraftBukkit-Patches/{0164-Alternative-Hopper-Ticking.patch => 0163-Alternative-Hopper-Ticking.patch} (100%) delete mode 100644 CraftBukkit-Patches/0163-Log-debug-levels-to-the-log-file.patch rename CraftBukkit-Patches/{0165-Apply-NBTReadLimiter-to-more-things.patch => 0164-Apply-NBTReadLimiter-to-more-things.patch} (100%) rename CraftBukkit-Patches/{0166-Allow-Attribute-Capping.patch => 0165-Allow-Attribute-Capping.patch} (100%) rename CraftBukkit-Patches/{0167-Add-an-option-for-a-global-cache-for-any-request-on-.patch => 0166-Add-an-option-for-a-global-cache-for-any-request-on-.patch} (100%) rename CraftBukkit-Patches/{0168-Only-fetch-an-online-UUID-in-online-mode.patch => 0167-Only-fetch-an-online-UUID-in-online-mode.patch} (100%) rename CraftBukkit-Patches/{0169-Filter-attribute-modifiers-which-cause-the-attribute.patch => 0168-Filter-attribute-modifiers-which-cause-the-attribute.patch} (100%) rename CraftBukkit-Patches/{0170-Fix-missed-diff-from-Minecraft-1.3.1-update.patch => 0169-Fix-missed-diff-from-Minecraft-1.3.1-update.patch} (100%) rename CraftBukkit-Patches/{0171-Fix-LEFT_CLICK_AIR-detection-when-not-in-creative.patch => 0170-Fix-LEFT_CLICK_AIR-detection-when-not-in-creative.patch} (100%) rename CraftBukkit-Patches/{0172-Plug-WorldMap-Memory-Leak.patch => 0171-Plug-WorldMap-Memory-Leak.patch} (100%) rename CraftBukkit-Patches/{0173-Force-Close-Inventory-On-Move.patch => 0172-Force-Close-Inventory-On-Move.patch} (100%) rename CraftBukkit-Patches/{0174-Fix-Corrupted-Trapped-Chest.patch => 0173-Fix-Corrupted-Trapped-Chest.patch} (100%) create mode 100644 CraftBukkit-Patches/0174-Remove-uneeded-validation.patch create mode 100644 CraftBukkit-Patches/0175-Add-Hunger-Config-Values.patch create mode 100644 CraftBukkit-Patches/0176-Make-debug-logging-togglable.patch delete mode 100644 Spigot-Server-Patches/Don-t-log-debug-information.patch diff --git a/CraftBukkit-Patches/0164-Alternative-Hopper-Ticking.patch b/CraftBukkit-Patches/0163-Alternative-Hopper-Ticking.patch similarity index 100% rename from CraftBukkit-Patches/0164-Alternative-Hopper-Ticking.patch rename to CraftBukkit-Patches/0163-Alternative-Hopper-Ticking.patch diff --git a/CraftBukkit-Patches/0163-Log-debug-levels-to-the-log-file.patch b/CraftBukkit-Patches/0163-Log-debug-levels-to-the-log-file.patch deleted file mode 100644 index 37f90028a2..0000000000 --- a/CraftBukkit-Patches/0163-Log-debug-levels-to-the-log-file.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Minecrell -Date: Thu, 24 Jul 2014 13:18:36 +0200 -Subject: [PATCH] Log debug levels to the log file. - - -diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/resources/log4j2.xml -+++ b/src/main/resources/log4j2.xml -@@ -0,0 +0,0 @@ - - - -- -+ - - - -- -+ - -- -+ - - - --- \ No newline at end of file diff --git a/CraftBukkit-Patches/0165-Apply-NBTReadLimiter-to-more-things.patch b/CraftBukkit-Patches/0164-Apply-NBTReadLimiter-to-more-things.patch similarity index 100% rename from CraftBukkit-Patches/0165-Apply-NBTReadLimiter-to-more-things.patch rename to CraftBukkit-Patches/0164-Apply-NBTReadLimiter-to-more-things.patch diff --git a/CraftBukkit-Patches/0166-Allow-Attribute-Capping.patch b/CraftBukkit-Patches/0165-Allow-Attribute-Capping.patch similarity index 100% rename from CraftBukkit-Patches/0166-Allow-Attribute-Capping.patch rename to CraftBukkit-Patches/0165-Allow-Attribute-Capping.patch diff --git a/CraftBukkit-Patches/0167-Add-an-option-for-a-global-cache-for-any-request-on-.patch b/CraftBukkit-Patches/0166-Add-an-option-for-a-global-cache-for-any-request-on-.patch similarity index 100% rename from CraftBukkit-Patches/0167-Add-an-option-for-a-global-cache-for-any-request-on-.patch rename to CraftBukkit-Patches/0166-Add-an-option-for-a-global-cache-for-any-request-on-.patch diff --git a/CraftBukkit-Patches/0168-Only-fetch-an-online-UUID-in-online-mode.patch b/CraftBukkit-Patches/0167-Only-fetch-an-online-UUID-in-online-mode.patch similarity index 100% rename from CraftBukkit-Patches/0168-Only-fetch-an-online-UUID-in-online-mode.patch rename to CraftBukkit-Patches/0167-Only-fetch-an-online-UUID-in-online-mode.patch diff --git a/CraftBukkit-Patches/0169-Filter-attribute-modifiers-which-cause-the-attribute.patch b/CraftBukkit-Patches/0168-Filter-attribute-modifiers-which-cause-the-attribute.patch similarity index 100% rename from CraftBukkit-Patches/0169-Filter-attribute-modifiers-which-cause-the-attribute.patch rename to CraftBukkit-Patches/0168-Filter-attribute-modifiers-which-cause-the-attribute.patch diff --git a/CraftBukkit-Patches/0170-Fix-missed-diff-from-Minecraft-1.3.1-update.patch b/CraftBukkit-Patches/0169-Fix-missed-diff-from-Minecraft-1.3.1-update.patch similarity index 100% rename from CraftBukkit-Patches/0170-Fix-missed-diff-from-Minecraft-1.3.1-update.patch rename to CraftBukkit-Patches/0169-Fix-missed-diff-from-Minecraft-1.3.1-update.patch diff --git a/CraftBukkit-Patches/0171-Fix-LEFT_CLICK_AIR-detection-when-not-in-creative.patch b/CraftBukkit-Patches/0170-Fix-LEFT_CLICK_AIR-detection-when-not-in-creative.patch similarity index 100% rename from CraftBukkit-Patches/0171-Fix-LEFT_CLICK_AIR-detection-when-not-in-creative.patch rename to CraftBukkit-Patches/0170-Fix-LEFT_CLICK_AIR-detection-when-not-in-creative.patch diff --git a/CraftBukkit-Patches/0172-Plug-WorldMap-Memory-Leak.patch b/CraftBukkit-Patches/0171-Plug-WorldMap-Memory-Leak.patch similarity index 100% rename from CraftBukkit-Patches/0172-Plug-WorldMap-Memory-Leak.patch rename to CraftBukkit-Patches/0171-Plug-WorldMap-Memory-Leak.patch diff --git a/CraftBukkit-Patches/0173-Force-Close-Inventory-On-Move.patch b/CraftBukkit-Patches/0172-Force-Close-Inventory-On-Move.patch similarity index 100% rename from CraftBukkit-Patches/0173-Force-Close-Inventory-On-Move.patch rename to CraftBukkit-Patches/0172-Force-Close-Inventory-On-Move.patch diff --git a/CraftBukkit-Patches/0174-Fix-Corrupted-Trapped-Chest.patch b/CraftBukkit-Patches/0173-Fix-Corrupted-Trapped-Chest.patch similarity index 100% rename from CraftBukkit-Patches/0174-Fix-Corrupted-Trapped-Chest.patch rename to CraftBukkit-Patches/0173-Fix-Corrupted-Trapped-Chest.patch diff --git a/CraftBukkit-Patches/0174-Remove-uneeded-validation.patch b/CraftBukkit-Patches/0174-Remove-uneeded-validation.patch new file mode 100644 index 0000000000..736c12197d --- /dev/null +++ b/CraftBukkit-Patches/0174-Remove-uneeded-validation.patch @@ -0,0 +1,36 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: drXor +Date: Fri, 15 Aug 2014 18:11:09 -0400 +Subject: [PATCH] Remove uneeded validation + + +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable { + } + + static void applyEnchantments(Map enchantments, NBTTagCompound tag, ItemMetaKey key) { +- if (enchantments == null || enchantments.size() == 0) { ++ if (enchantments == null /*|| enchantments.size() == 0*/) { // Spigot - remove size check + return; + } + +@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable { + } + + public boolean removeEnchant(Enchantment ench) { +- return hasEnchants() && enchantments.remove(ench) != null; ++ // Spigot start ++ boolean b = hasEnchants() && enchantments.remove( ench ) != null; ++ if ( enchantments != null && enchantments.isEmpty() ) ++ { ++ this.enchantments = null; ++ } ++ return b; ++ // Spigot end + } + + public boolean hasEnchants() { +-- \ No newline at end of file diff --git a/CraftBukkit-Patches/0175-Add-Hunger-Config-Values.patch b/CraftBukkit-Patches/0175-Add-Hunger-Config-Values.patch new file mode 100644 index 0000000000..08a0a5708f --- /dev/null +++ b/CraftBukkit-Patches/0175-Add-Hunger-Config-Values.patch @@ -0,0 +1,66 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: lazertester +Date: Sun, 17 Aug 2014 19:56:17 +1000 +Subject: [PATCH] Add Hunger Config Values + + +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 + } + } + +- this.applyExhaustion(0.3F); ++ this.applyExhaustion(world.spigotConfig.combatExhaustion); // Spigot - Change to use configurable value + } else if (flag1) { + entity.extinguish(); + } +@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen + super.bj(); + this.a(StatisticList.r, 1); + if (this.isSprinting()) { +- this.applyExhaustion(0.8F); ++ this.applyExhaustion(world.spigotConfig.sprintExhaustion); // Spigot - Change to use configurable value + } else { +- this.applyExhaustion(0.2F); ++ this.applyExhaustion(world.spigotConfig.walkExhaustion); // Spigot - Change to use configurable value + } + } + +diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/FoodMetaData.java ++++ b/src/main/java/net/minecraft/server/FoodMetaData.java +@@ -0,0 +0,0 @@ public class FoodMetaData { + if (this.foodTickTimer >= 80) { + // CraftBukkit - added RegainReason + entityhuman.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); +- this.a(3.0F); ++ this.a(entityhuman.world.spigotConfig.regenExhaustion); // Spigot - Change to use configurable value + this.foodTickTimer = 0; + } + } else if (this.foodLevel <= 0) { +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -0,0 +0,0 @@ public class SpigotWorldConfig + largeFeatureSeed = getInt( "seed-feature", 14357617 ); + log( "Custom Map Seeds: Village: " + villageSeed + " Feature: " + largeFeatureSeed ); + } ++ ++ public float walkExhaustion; ++ public float sprintExhaustion; ++ public float combatExhaustion; ++ public float regenExhaustion; ++ private void initHunger() ++ { ++ walkExhaustion = (float) getDouble( "hunger.walk-exhaustion", 0.2 ); ++ sprintExhaustion = (float) getDouble( "hunger.sprint-exhaustion", 0.8 ); ++ combatExhaustion = (float) getDouble( "hunger.combat-exhaustion", 0.3 ); ++ regenExhaustion = (float) getDouble( "hunger.regen-exhaustion", 3 ); ++ } + } +-- \ No newline at end of file diff --git a/CraftBukkit-Patches/0176-Make-debug-logging-togglable.patch b/CraftBukkit-Patches/0176-Make-debug-logging-togglable.patch new file mode 100644 index 0000000000..9346452c6a --- /dev/null +++ b/CraftBukkit-Patches/0176-Make-debug-logging-togglable.patch @@ -0,0 +1,65 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Minecrell +Date: Sun, 17 Aug 2014 12:42:53 +0200 +Subject: [PATCH] Make debug logging togglable. + + +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/spigotmc/SpigotConfig.java ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -0,0 +0,0 @@ import net.minecraft.server.AttributeRanged; + import net.minecraft.server.GenericAttributes; + import net.minecraft.util.gnu.trove.map.hash.TObjectIntHashMap; + import net.minecraft.server.MinecraftServer; ++import org.apache.logging.log4j.LogManager; ++import org.apache.logging.log4j.core.LoggerContext; ++import org.apache.logging.log4j.core.config.Configuration; + import org.bukkit.Bukkit; + import org.bukkit.ChatColor; + import org.bukkit.command.Command; +@@ -0,0 +0,0 @@ public class SpigotConfig + URL.setURLStreamHandlerFactory(new CachedStreamHandlerFactory()); + } + } ++ ++ public static boolean debug; ++ private static void debug() ++ { ++ debug = getBoolean( "settings.debug", false ); ++ ++ if ( debug && !LogManager.getRootLogger().isTraceEnabled() ) ++ { ++ // Enable debug logging ++ LoggerContext ctx = (LoggerContext) LogManager.getContext( false ); ++ Configuration conf = ctx.getConfiguration(); ++ conf.getLoggerConfig( LogManager.ROOT_LOGGER_NAME ).setLevel( org.apache.logging.log4j.Level.ALL ); ++ ctx.updateLoggers( conf ); ++ } ++ ++ if ( LogManager.getRootLogger().isTraceEnabled() ) ++ { ++ Bukkit.getLogger().info( "Debug logging is enabled" ); ++ } else ++ { ++ Bukkit.getLogger().info( "Debug logging is disabled" ); ++ } ++ } + } +diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/resources/log4j2.xml ++++ b/src/main/resources/log4j2.xml +@@ -0,0 +0,0 @@ + + + +- ++ + +- ++ + + + +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch b/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch index 31f7d5b990..f619cc1ce7 100644 --- a/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch +++ b/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch @@ -30,8 +30,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- 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 - fishingMinTicks = getInt( "fishing-time-range.MinimumTicks", 100 ); - fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", 900 ); + blockBreakExhaustion = getFloat( "player-exhaustion.block-break", 0.025F ); + playerSwimmingExhaustion = getFloat("player-exhaustion.swimming", 0.015F ); } + + public Integer softDespawnDistance; diff --git a/Spigot-Server-Patches/Don-t-log-debug-information.patch b/Spigot-Server-Patches/Don-t-log-debug-information.patch deleted file mode 100644 index 77153220d0..0000000000 --- a/Spigot-Server-Patches/Don-t-log-debug-information.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Dmck2b -Date: Mon, 4 Aug 2014 02:56:23 +0100 -Subject: [PATCH] Don't log debug information - - -diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/resources/log4j2.xml -+++ b/src/main/resources/log4j2.xml -@@ -0,0 +0,0 @@ - - - -- -+ - - - -- -+ - -- -+ - - -- -- -+ -\ No newline at end of file --- -1.8.4.msysgit.0 - diff --git a/Spigot-Server-Patches/Player-Exhaustion-Multipliers.patch b/Spigot-Server-Patches/Player-Exhaustion-Multipliers.patch index 94e43b84b2..e797a3d488 100644 --- a/Spigot-Server-Patches/Player-Exhaustion-Multipliers.patch +++ b/Spigot-Server-Patches/Player-Exhaustion-Multipliers.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: gsand -Date: Tue, 5 Aug 2014 18:28:21 -0500 +Date: Sun, 17 Aug 2014 16:40:54 -0500 Subject: [PATCH] Player Exhaustion Multipliers @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) { entityhuman.a(StatisticList.MINE_BLOCK_COUNT[getId(this)], 1); - entityhuman.applyExhaustion(0.025F); -+ entityhuman.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionBlockBreak); // PaperSpigot - Configurable block breaking exhaustion ++ entityhuman.applyExhaustion(world.paperSpigotConfig.blockBreakExhaustion); // PaperSpigot - Configurable block break exhaustion if (this.E() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman)) { ItemStack itemstack = this.j(l); @@ -21,95 +21,37 @@ diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/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 - } - } - -- this.applyExhaustion(0.3F); -+ this.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionAttack); // PaperSpigot - Configurable attack exhaustion - } else if (flag1) { - entity.extinguish(); - } -@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen - super.bj(); - this.a(StatisticList.r, 1); - if (this.isSprinting()) { -- this.applyExhaustion(0.8F); -+ this.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionSprintJumping); // PaperSpigot - Configurable sprint jumping exhaustion - } else { -- this.applyExhaustion(0.2F); -+ this.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionJumping); // PaperSpigot - Configurable jumping exhaustion - } - } - @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen i = Math.round(MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F); if (i > 0) { this.a(StatisticList.m, i); - this.applyExhaustion(0.015F * (float) i * 0.01F); -+ this.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionSwimming * (float) i * 0.01F); // PaperSpigot - Configurable swimming exhaustion ++ this.applyExhaustion(world.paperSpigotConfig.playerSwimmingExhaustion * (float) i * 0.01F); // PaperSpigot - Configurable swimming exhaustion } } else if (this.M()) { i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F); if (i > 0) { this.a(StatisticList.i, i); - this.applyExhaustion(0.015F * (float) i * 0.01F); -+ this.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionSwimming * (float) i * 0.01F); // PaperSpigot - Configurable swimming (diving) exhaustion ++ this.applyExhaustion(world.paperSpigotConfig.playerSwimmingExhaustion * (float) i * 0.01F); // PaperSpigot - Configurable swimming (diving) exhaustion } } else if (this.h_()) { if (d1 > 0.0D) { -@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen - if (i > 0) { - this.a(StatisticList.h, i); - if (this.isSprinting()) { -- this.applyExhaustion(0.099999994F * (float) i * 0.01F); -+ this.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionSprinting * (float) i * 0.01F); // PaperSpigot - Configurable sprinting exhaustion - } else { -- this.applyExhaustion(0.01F * (float) i * 0.01F); -+ this.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionWalking * (float) i * 0.01F); // PaperSpigot - Configurable walking exhaustion - } - } - } else { -diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java +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/net/minecraft/server/FoodMetaData.java -+++ b/src/main/java/net/minecraft/server/FoodMetaData.java -@@ -0,0 +0,0 @@ public class FoodMetaData { - if (this.foodTickTimer >= 80) { - // CraftBukkit - added RegainReason - entityhuman.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); -- this.a(3.0F); -+ this.a(org.github.paperspigot.PaperSpigotConfig.playerExhaustionRegeneration); // PaperSpigot - Configurable regeneration exhaustion - this.foodTickTimer = 0; - } - } else if (this.foodLevel <= 0) { -diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java -+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java -@@ -0,0 +0,0 @@ public class PaperSpigotConfig - Bukkit.getLogger().log( Level.INFO, "Disabling player interaction limiter, your server may be more vulnerable to malicious users" ); - } +--- 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 + fishingMinTicks = getInt( "fishing-time-range.MinimumTicks", 100 ); + fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", 900 ); } + -+ public static float playerExhaustionWalking; -+ public static float playerExhaustionSwimming; -+ public static float playerExhaustionBlockBreak; -+ public static float playerExhaustionSprinting; -+ public static float playerExhaustionJumping; -+ public static float playerExhaustionSprintJumping; -+ public static float playerExhaustionAttack; -+ public static float playerExhaustionRegeneration; -+ private static void playerExhaustion() ++ public float blockBreakExhaustion; ++ public float playerSwimmingExhaustion; ++ private void exhaustionValues () + { -+ playerExhaustionWalking = getFloat( "player-exhaustion.walking", 0.01F ); -+ playerExhaustionSwimming = getFloat( "player-exhaustion.swimming", 0.015F ); -+ playerExhaustionBlockBreak = getFloat( "player-exhaustion.block-break", 0.025F ); -+ playerExhaustionSprinting = getFloat( "player-exhaustion.sprinting", 0.1F ); -+ playerExhaustionJumping = getFloat( "player-exhaustion.jumping", 0.2F ); -+ playerExhaustionSprintJumping = getFloat( "player-exhaustion.sprint-jumping", 0.8F ); -+ playerExhaustionAttack = getFloat( "player-exhaustion.attack", 0.3F ); -+ playerExhaustionRegeneration = getFloat( "player-exhaustion.regeneration", 3.0F ); ++ blockBreakExhaustion = getFloat( "player-exhaustion.block-break", 0.025F ); ++ playerSwimmingExhaustion = getFloat("player-exhaustion.swimming", 0.015F ); + } } -- \ No newline at end of file