2015-03-21 03:39:37 +01:00
|
|
|
From 063a8a59cfd31b7f11ea2f371ed03d0e9bfdd947 Mon Sep 17 00:00:00 2001
|
2015-01-29 22:25:50 +01:00
|
|
|
From: gsand <gsandowns@gmail.com>
|
2015-03-08 02:16:09 +01:00
|
|
|
Date: Sat, 7 Mar 2015 21:35:14 -0600
|
2014-07-07 02:18:38 +02: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
|
2015-03-08 02:16:09 +01:00
|
|
|
index 66e099f..df7e8e8 100644
|
2014-07-07 02:18:38 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/Block.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Block.java
|
2015-03-08 02:16:09 +01:00
|
|
|
@@ -566,7 +566,7 @@ public class Block {
|
2014-07-07 02:18:38 +02:00
|
|
|
|
2014-11-28 02:17:45 +01:00
|
|
|
public void a(World world, EntityHuman entityhuman, BlockPosition blockposition, IBlockData iblockdata, TileEntity tileentity) {
|
|
|
|
entityhuman.b(StatisticList.MINE_BLOCK_COUNT[getId(this)]);
|
2014-07-09 05:05:35 +02:00
|
|
|
- entityhuman.applyExhaustion(0.025F);
|
2014-08-17 23:47:36 +02:00
|
|
|
+ entityhuman.applyExhaustion(world.paperSpigotConfig.blockBreakExhaustion); // PaperSpigot - Configurable block break exhaustion
|
2015-03-08 02:16:09 +01:00
|
|
|
if (this.I() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman)) {
|
2014-11-28 02:17:45 +01:00
|
|
|
ItemStack itemstack = this.i(iblockdata);
|
2014-07-07 02:18:38 +02:00
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
2015-03-08 02:16:09 +01:00
|
|
|
index 9dce3ac..e7fd331 100644
|
2014-07-07 02:18:38 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
2015-03-08 02:16:09 +01:00
|
|
|
@@ -1370,13 +1370,13 @@ public abstract class EntityHuman extends EntityLiving {
|
2014-07-07 02:18:38 +02:00
|
|
|
i = Math.round(MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F);
|
|
|
|
if (i > 0) {
|
2014-11-28 02:17:45 +01:00
|
|
|
this.a(StatisticList.p, i);
|
2014-07-09 05:05:35 +02:00
|
|
|
- this.applyExhaustion(0.015F * (float) i * 0.01F);
|
2014-08-17 23:47:36 +02:00
|
|
|
+ this.applyExhaustion(world.paperSpigotConfig.playerSwimmingExhaustion * (float) i * 0.01F); // PaperSpigot - Configurable swimming exhaustion
|
2014-07-07 02:18:38 +02:00
|
|
|
}
|
2014-11-28 02:17:45 +01:00
|
|
|
} else if (this.V()) {
|
2014-07-07 02:18:38 +02:00
|
|
|
i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F);
|
|
|
|
if (i > 0) {
|
2014-11-28 02:17:45 +01:00
|
|
|
this.a(StatisticList.l, i);
|
2014-07-09 05:05:35 +02:00
|
|
|
- this.applyExhaustion(0.015F * (float) i * 0.01F);
|
2014-08-17 23:47:36 +02:00
|
|
|
+ this.applyExhaustion(world.paperSpigotConfig.playerSwimmingExhaustion * (float) i * 0.01F); // PaperSpigot - Configurable swimming (diving) exhaustion
|
2014-07-07 02:18:38 +02:00
|
|
|
}
|
2015-03-08 02:16:09 +01:00
|
|
|
} else if (this.k_()) {
|
2014-07-07 02:18:38 +02:00
|
|
|
if (d1 > 0.0D) {
|
2014-08-17 23:47:36 +02:00
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2015-03-08 02:16:09 +01:00
|
|
|
index b7afd3e..ac2f470 100644
|
2014-08-17 23:47:36 +02:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2014-11-28 02:17:45 +01:00
|
|
|
@@ -114,4 +114,12 @@ public class PaperSpigotWorldConfig
|
2014-08-17 23:47:36 +02:00
|
|
|
fishingMinTicks = getInt( "fishing-time-range.MinimumTicks", 100 );
|
|
|
|
fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", 900 );
|
2014-07-07 02:18:38 +02:00
|
|
|
}
|
|
|
|
+
|
2014-08-17 23:47:36 +02:00
|
|
|
+ public float blockBreakExhaustion;
|
|
|
|
+ public float playerSwimmingExhaustion;
|
2015-03-08 02:16:09 +01:00
|
|
|
+ private void exhaustionValues()
|
2014-07-07 02:18:38 +02:00
|
|
|
+ {
|
2014-08-17 23:47:36 +02:00
|
|
|
+ blockBreakExhaustion = getFloat( "player-exhaustion.block-break", 0.025F );
|
2015-03-08 02:16:09 +01:00
|
|
|
+ playerSwimmingExhaustion = getFloat( "player-exhaustion.swimming", 0.015F );
|
2014-07-07 02:18:38 +02:00
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-03-08 02:16:09 +01:00
|
|
|
1.9.1
|
2014-07-07 02:18:38 +02:00
|
|
|
|