mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
40 lines
1.9 KiB
Diff
40 lines
1.9 KiB
Diff
From f4bb4188db4477614faec7dcfb84f67496cdde11 Mon Sep 17 00:00:00 2001
|
|
From: gsand <gsandowns@gmail.com>
|
|
Date: Sun, 8 Mar 2015 03:41:33 -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 620685a..175503b 100644
|
|
--- a/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
|
|
+++ b/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
|
|
@@ -7,6 +7,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) (org.github.paperspigot.PaperSpigotConfig.weaknessEffectModifier * (float) (i + 1)) : org.github.paperspigot.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 b0dd5b0..5df90f9 100644
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
|
@@ -154,4 +154,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 );
|
|
+ }
|
|
}
|
|
--
|
|
2.5.2
|
|
|