2014-11-28 01:17:45 +00:00
|
|
|
From a9bcbb534f1d780a4f7878fe12d192f16c722348 Mon Sep 17 00:00:00 2001
|
2014-08-31 17:31:44 +00:00
|
|
|
From: Zach Brown <Zbob750@live.com>
|
2014-11-28 01:17:45 +00:00
|
|
|
Date: Fri, 28 Nov 2014 12:23:02 -0600
|
2014-08-31 17:31:44 +00:00
|
|
|
Subject: [PATCH] Configurable strength and weakness effect modifiers
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/MobEffectAttackDamage.java b/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
|
2014-11-28 01:17:45 +00:00
|
|
|
index 620685a..175503b 100644
|
2014-08-31 17:31:44 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
|
2014-11-28 01:17:45 +00:00
|
|
|
@@ -7,6 +7,7 @@ public class MobEffectAttackDamage extends MobEffectList {
|
2014-08-31 17:31:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public double a(int i, AttributeModifier attributemodifier) {
|
|
|
|
- return this.id == MobEffectList.WEAKNESS.id ? (double) (-0.5F * (float) (i + 1)) : 1.3D * (double) (i + 1);
|
|
|
|
+ // PaperSpigot - Configurable modifiers for strength and weakness effects
|
2014-11-28 01:17:45 +00:00
|
|
|
+ return this.id == MobEffectList.WEAKNESS.id ? (double) (org.github.paperspigot.PaperSpigotConfig.weaknessEffectModifier * (float) (i + 1)) : org.github.paperspigot.PaperSpigotConfig.strengthEffectModifier * (double) (i + 1);
|
2014-08-31 17:31:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
|
|
|
index 25a94a6..a7b18e4 100644
|
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
|
|
|
@@ -161,4 +161,12 @@ public class PaperSpigotConfig
|
|
|
|
Bukkit.getLogger().log( Level.INFO, "Disabling player interaction limiter, your server may be more vulnerable to malicious users" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public static double strengthEffectModifier;
|
|
|
|
+ public static double weaknessEffectModifier;
|
|
|
|
+ private static void effectModifiers()
|
|
|
|
+ {
|
|
|
|
+ strengthEffectModifier = getDouble( "effect-modifiers.strength", 1.3D );
|
|
|
|
+ weaknessEffectModifier = getDouble( "effect-modifiers.weakness", -0.5D );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2014-10-25 03:25:14 +00:00
|
|
|
1.9.1
|
2014-08-31 17:31:44 +00:00
|
|
|
|