2014-06-24 12:21:58 +00:00
|
|
|
From 066bebc34a5e98872c03aa1d671cca61322cbd3e 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-06-24 12:21:58 +00:00
|
|
|
index 408c514..27e8938 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
|
|
|
|
|
|
|
|
+import org.spigotmc.SpigotWorldConfig; // PaperSpigot
|
|
|
|
+
|
|
|
|
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-06-24 12:21:58 +00:00
|
|
|
+ f = (1.0F + f) * SpigotWorldConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable PvP blocking damage multiplier
|
2014-06-22 20:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
f = this.b(damagesource, f);
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
2014-06-24 12:21:58 +00:00
|
|
|
index 5abecfd..c253a1b 100644
|
2014-06-22 20:38:17 +00:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
@@ -340,4 +340,10 @@ public class SpigotWorldConfig
|
2014-06-24 12:21:58 +00:00
|
|
|
allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true);
|
|
|
|
log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing );
|
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
|
|
|
|
|