mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 06:24:06 +01:00
39 lines
1.9 KiB
Diff
39 lines
1.9 KiB
Diff
From 490c255eaa142d4712b7fb492d7ccb0fca59d408 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Fri, 28 Nov 2014 00:45:14 -0600
|
|
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
|
|
index 00aa03d..876cf4e 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
@@ -862,7 +862,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|
// CraftBukkit end
|
|
if (!this.isInvulnerable(damagesource)) {
|
|
if (!damagesource.ignoresArmor() && this.isBlocking() && f > 0.0F) {
|
|
- f = (1.0F + f) * 0.5F;
|
|
+ f = (1.0F + f) * this.world.paperSpigotConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable damage multiplier for blocking
|
|
}
|
|
|
|
f = this.applyArmorModifier(damagesource, f);
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
index f6b0349..5cda463 100644
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
@@ -90,4 +90,11 @@ public class PaperSpigotWorldConfig
|
|
squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D );
|
|
log( "Squids will spawn between Y: " + squidMinSpawnHeight + " and Y: " + squidMaxSpawnHeight);
|
|
}
|
|
+
|
|
+ public float playerBlockingDamageMultiplier;
|
|
+ private void playerBlockingDamageMultiplier()
|
|
+ {
|
|
+ playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F );
|
|
+ log( "Player blocking damage multiplier set to " + playerBlockingDamageMultiplier);
|
|
+ }
|
|
}
|
|
--
|
|
1.9.5.msysgit.0
|
|
|