Restructure PaperSpigot as a new set of modules
Allows us much greater control over the Spigot portion of the code and makes us more "proper" Credit to @Dmck2b for originally passing the idea along a while back
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Tue, 24 Jun 2014 07:39:37 -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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.event.player.PlayerDropItemEvent;
|
||||
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
+import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot
|
||||
+
|
||||
public abstract class EntityHuman extends EntityLiving implements ICommandListener {
|
||||
|
||||
public PlayerInventory inventory = new PlayerInventory(this);
|
||||
@@ -0,0 +0,0 @@ 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) * PaperSpigotWorldConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable PvP blocking damage multiplier
|
||||
}
|
||||
|
||||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig
|
||||
squidMinSpawnHeight = getDouble( "squid-spawn-height.minimum", 45.0D );
|
||||
squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D );
|
||||
}
|
||||
+
|
||||
+ public static float playerBlockingDamageMultiplier;
|
||||
+ private void playerBlockingDamageMultiplier()
|
||||
+ {
|
||||
+ playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
Reference in New Issue
Block a user