2015-03-08 01:16:09 +00:00
|
|
|
From 9b9c2851ddafd52f5e631de7ec1be02a35ad64e1 Mon Sep 17 00:00:00 2001
|
2015-01-29 21:25:50 +00:00
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
2015-03-08 01:16:09 +00:00
|
|
|
Date: Sat, 7 Mar 2015 20:27:02 -0600
|
2014-06-22 20:38:17 +00:00
|
|
|
Subject: [PATCH] Configurable damage multiplier for PvP blocking
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
2015-03-08 01:16:09 +00:00
|
|
|
index d73395a..9dce3ac 100644
|
2014-06-22 20:38:17 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
2015-03-08 01:16:09 +00:00
|
|
|
@@ -861,7 +861,7 @@ public abstract class EntityHuman extends EntityLiving {
|
2014-06-24 12:21:58 +00:00
|
|
|
// CraftBukkit end
|
2014-11-28 01:17:45 +00:00
|
|
|
if (!this.isInvulnerable(damagesource)) {
|
2014-06-22 20:38:17 +00:00
|
|
|
if (!damagesource.ignoresArmor() && this.isBlocking() && f > 0.0F) {
|
|
|
|
- f = (1.0F + f) * 0.5F;
|
2015-03-08 01:16:09 +00:00
|
|
|
+ f = (1.0F + f) * this.world.paperSpigotConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable damage multiplier for blocking;
|
2014-06-22 20:38:17 +00:00
|
|
|
}
|
|
|
|
|
2014-07-09 03:05:35 +00:00
|
|
|
f = this.applyArmorModifier(damagesource, f);
|
2014-07-03 01:47:25 +00:00
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2015-03-08 01:16:09 +00:00
|
|
|
index f3bbac8..2a84879 100644
|
2014-07-03 01:47:25 +00:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2014-08-05 23:45:22 +00:00
|
|
|
@@ -90,4 +90,11 @@ public class PaperSpigotWorldConfig
|
2014-07-03 01:47:25 +00:00
|
|
|
squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D );
|
2015-03-08 01:16:09 +00:00
|
|
|
log( "Squids will spawn between Y: " + squidMinSpawnHeight + " and Y: " + squidMaxSpawnHeight );
|
2014-06-22 20:38:17 +00:00
|
|
|
}
|
|
|
|
+
|
2014-08-05 23:45:22 +00:00
|
|
|
+ public float playerBlockingDamageMultiplier;
|
2014-06-24 12:21:58 +00:00
|
|
|
+ private void playerBlockingDamageMultiplier()
|
2014-06-22 20:38:17 +00:00
|
|
|
+ {
|
|
|
|
+ playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F );
|
2015-03-08 01:16:09 +00:00
|
|
|
+ log( "Player blocking damage multiplier set to " + playerBlockingDamageMultiplier );
|
2014-06-22 20:38:17 +00:00
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-03-08 01:16:09 +00:00
|
|
|
1.9.1
|
2014-06-22 20:38:17 +00:00
|
|
|
|