2014-09-01 19:11:02 +00:00
|
|
|
From 413a2db4e6968e7c3f618f7abdc6aa7c6641340b Mon Sep 17 00:00:00 2001
|
2014-07-07 00:18:38 +00:00
|
|
|
From: gsand <gsandowns@gmail.com>
|
2014-08-17 21:47:36 +00:00
|
|
|
Date: Sun, 17 Aug 2014 16:40:54 -0500
|
2014-07-07 00:18:38 +00:00
|
|
|
Subject: [PATCH] Player Exhaustion Multipliers
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
2014-08-17 21:47:36 +00:00
|
|
|
index 0893a6f..24e84d6 100644
|
2014-07-07 00:18:38 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/Block.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Block.java
|
2014-08-05 23:45:22 +00:00
|
|
|
@@ -686,7 +686,7 @@ public class Block {
|
2014-07-07 00:18:38 +00:00
|
|
|
|
|
|
|
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
|
2014-07-09 03:05:35 +00:00
|
|
|
entityhuman.a(StatisticList.MINE_BLOCK_COUNT[getId(this)], 1);
|
|
|
|
- entityhuman.applyExhaustion(0.025F);
|
2014-08-17 21:47:36 +00:00
|
|
|
+ entityhuman.applyExhaustion(world.paperSpigotConfig.blockBreakExhaustion); // PaperSpigot - Configurable block break exhaustion
|
2014-07-07 00:18:38 +00:00
|
|
|
if (this.E() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman)) {
|
|
|
|
ItemStack itemstack = this.j(l);
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
2014-09-01 19:11:02 +00:00
|
|
|
index a0e4855..35b5cfb 100644
|
2014-07-07 00:18:38 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
2014-09-01 19:11:02 +00:00
|
|
|
@@ -1314,13 +1314,13 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
2014-07-07 00:18:38 +00:00
|
|
|
i = Math.round(MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F);
|
|
|
|
if (i > 0) {
|
|
|
|
this.a(StatisticList.m, i);
|
2014-07-09 03:05:35 +00:00
|
|
|
- this.applyExhaustion(0.015F * (float) i * 0.01F);
|
2014-08-17 21:47:36 +00:00
|
|
|
+ this.applyExhaustion(world.paperSpigotConfig.playerSwimmingExhaustion * (float) i * 0.01F); // PaperSpigot - Configurable swimming exhaustion
|
2014-07-07 00:18:38 +00:00
|
|
|
}
|
2014-07-09 03:05:35 +00:00
|
|
|
} else if (this.M()) {
|
2014-07-07 00:18:38 +00:00
|
|
|
i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F);
|
|
|
|
if (i > 0) {
|
|
|
|
this.a(StatisticList.i, i);
|
2014-07-09 03:05:35 +00:00
|
|
|
- this.applyExhaustion(0.015F * (float) i * 0.01F);
|
2014-08-17 21:47:36 +00:00
|
|
|
+ this.applyExhaustion(world.paperSpigotConfig.playerSwimmingExhaustion * (float) i * 0.01F); // PaperSpigot - Configurable swimming (diving) exhaustion
|
2014-07-07 00:18:38 +00:00
|
|
|
}
|
|
|
|
} else if (this.h_()) {
|
|
|
|
if (d1 > 0.0D) {
|
2014-08-17 21:47:36 +00:00
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
index 1d01f89..df84df5 100644
|
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
@@ -121,4 +121,12 @@ public class PaperSpigotWorldConfig
|
|
|
|
fishingMinTicks = getInt( "fishing-time-range.MinimumTicks", 100 );
|
|
|
|
fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", 900 );
|
2014-07-07 00:18:38 +00:00
|
|
|
}
|
|
|
|
+
|
2014-08-17 21:47:36 +00:00
|
|
|
+ public float blockBreakExhaustion;
|
|
|
|
+ public float playerSwimmingExhaustion;
|
|
|
|
+ private void exhaustionValues ()
|
2014-07-07 00:18:38 +00:00
|
|
|
+ {
|
2014-08-17 21:47:36 +00:00
|
|
|
+ blockBreakExhaustion = getFloat( "player-exhaustion.block-break", 0.025F );
|
|
|
|
+ playerSwimmingExhaustion = getFloat("player-exhaustion.swimming", 0.015F );
|
2014-07-07 00:18:38 +00:00
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
|
|
|
1.9.1
|
|
|
|
|