2014-07-21 20:46:54 +00:00
|
|
|
From f67c6952b8a3653548157d3bcfd6acace37d0c5b Mon Sep 17 00:00:00 2001
|
2014-06-22 20:38:17 +00:00
|
|
|
From: Zach Brown <Zbob750@live.com>
|
2014-06-24 12:21:58 +00:00
|
|
|
Date: Tue, 24 Jun 2014 07:39:37 -0500
|
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
|
2014-07-09 03:05:35 +00:00
|
|
|
index 01062ce..a75e854 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
|
|
|
|
@@ -20,6 +20,8 @@ import org.bukkit.event.player.PlayerDropItemEvent;
|
|
|
|
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
|
|
|
// CraftBukkit end
|
|
|
|
|
2014-07-03 01:47:25 +00:00
|
|
|
+import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot
|
2014-06-22 20:38:17 +00:00
|
|
|
+
|
|
|
|
public abstract class EntityHuman extends EntityLiving implements ICommandListener {
|
|
|
|
|
|
|
|
public PlayerInventory inventory = new PlayerInventory(this);
|
2014-06-24 12:21:58 +00:00
|
|
|
@@ -812,7 +814,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|
|
|
// CraftBukkit end
|
2014-06-22 20:38:17 +00:00
|
|
|
if (!this.isInvulnerable()) {
|
|
|
|
if (!damagesource.ignoresArmor() && this.isBlocking() && f > 0.0F) {
|
|
|
|
- f = (1.0F + f) * 0.5F;
|
2014-07-03 01:47:25 +00:00
|
|
|
+ f = (1.0F + f) * PaperSpigotWorldConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable PvP blocking damage multiplier
|
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
|
|
|
|
index dc8c581..9f2c3dc 100644
|
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
@@ -89,4 +89,10 @@ public class PaperSpigotWorldConfig
|
|
|
|
squidMinSpawnHeight = getDouble( "squid-spawn-height.minimum", 45.0D );
|
|
|
|
squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D );
|
2014-06-22 20:38:17 +00:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public static 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 );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
|
|
|
1.9.1
|
|
|
|
|