2015-01-29 22:26:20 +01:00
|
|
|
From 490c255eaa142d4712b7fb492d7ccb0fca59d408 Mon Sep 17 00:00:00 2001
|
2015-01-29 22:25:50 +01:00
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
2014-11-28 02:17:45 +01:00
|
|
|
Date: Fri, 28 Nov 2014 00:45:14 -0600
|
2014-06-22 22:38:17 +02: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-01-29 22:26:20 +01:00
|
|
|
index 00aa03d..876cf4e 100644
|
2014-06-22 22:38:17 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
2014-12-07 20:29:55 +01:00
|
|
|
@@ -862,7 +862,7 @@ public abstract class EntityHuman extends EntityLiving {
|
2014-06-24 14:21:58 +02:00
|
|
|
// CraftBukkit end
|
2014-11-28 02:17:45 +01:00
|
|
|
if (!this.isInvulnerable(damagesource)) {
|
2014-06-22 22:38:17 +02:00
|
|
|
if (!damagesource.ignoresArmor() && this.isBlocking() && f > 0.0F) {
|
|
|
|
- f = (1.0F + f) * 0.5F;
|
2014-08-06 01:45:22 +02:00
|
|
|
+ f = (1.0F + f) * this.world.paperSpigotConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable damage multiplier for blocking
|
2014-06-22 22:38:17 +02:00
|
|
|
}
|
|
|
|
|
2014-07-09 05:05:35 +02:00
|
|
|
f = this.applyArmorModifier(damagesource, f);
|
2014-07-03 03:47:25 +02:00
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2014-08-06 01:45:22 +02:00
|
|
|
index f6b0349..5cda463 100644
|
2014-07-03 03:47:25 +02:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2014-08-06 01:45:22 +02:00
|
|
|
@@ -90,4 +90,11 @@ public class PaperSpigotWorldConfig
|
2014-07-03 03:47:25 +02:00
|
|
|
squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D );
|
2014-08-06 01:45:22 +02:00
|
|
|
log( "Squids will spawn between Y: " + squidMinSpawnHeight + " and Y: " + squidMaxSpawnHeight);
|
2014-06-22 22:38:17 +02:00
|
|
|
}
|
|
|
|
+
|
2014-08-06 01:45:22 +02:00
|
|
|
+ public float playerBlockingDamageMultiplier;
|
2014-06-24 14:21:58 +02:00
|
|
|
+ private void playerBlockingDamageMultiplier()
|
2014-06-22 22:38:17 +02:00
|
|
|
+ {
|
|
|
|
+ playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F );
|
2014-08-06 01:45:22 +02:00
|
|
|
+ log( "Player blocking damage multiplier set to " + playerBlockingDamageMultiplier);
|
2014-06-22 22:38:17 +02:00
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-01-29 22:26:20 +01:00
|
|
|
1.9.5.msysgit.0
|
2014-06-22 22:38:17 +02:00
|
|
|
|