mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 03:32:46 +01:00
495c399ff4
Add support for Minecraft 1.8.x SpigotMC/Spigot@b15ae91145 Skip loading of ProtocolLib SpigotMC/Spigot@508ec8f573 Apply the block fix to block change packets SpigotMC/Spigot@b9349e416d Blacklist Orebfuscator as well. SpigotMC/Spigot@b2ba105762
38 lines
1.8 KiB
Diff
38 lines
1.8 KiB
Diff
From 3e2e1768b7a5673c56438b14adff27392fa82f1c Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <Zbob750@live.com>
|
|
Date: Tue, 5 Aug 2014 16:21:03 -0500
|
|
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 5bb7295..a0e4855 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
@@ -826,7 +826,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|
// CraftBukkit end
|
|
if (!this.isInvulnerable()) {
|
|
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.1
|
|
|