mirror of
https://github.com/PaperMC/Paper.git
synced 2024-09-12 06:58:11 +02:00
48 lines
2.1 KiB
Diff
48 lines
2.1 KiB
Diff
From 78ba8b100ca7bc2d828c055e28cc37e2660dbe56 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <Zbob750@live.com>
|
|
Date: Sun, 31 Aug 2014 12:13:32 -0500
|
|
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
|
|
index 3eb029d..c448789 100644
|
|
--- a/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
|
|
+++ b/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
|
|
@@ -1,5 +1,7 @@
|
|
package net.minecraft.server;
|
|
|
|
+import org.github.paperspigot.PaperSpigotConfig;
|
|
+
|
|
public class MobEffectAttackDamage extends MobEffectList {
|
|
|
|
protected MobEffectAttackDamage(int i, boolean flag, int j) {
|
|
@@ -7,6 +9,7 @@ public class MobEffectAttackDamage extends MobEffectList {
|
|
}
|
|
|
|
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
|
|
+ return this.id == MobEffectList.WEAKNESS.id ? (double) (PaperSpigotConfig.weaknessEffectModifier * (float) (i + 1)) : PaperSpigotConfig.strengthEffectModifier * (double) (i + 1);
|
|
}
|
|
}
|
|
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 );
|
|
+ }
|
|
}
|
|
--
|
|
1.9.4.msysgit.1
|
|
|