CavePVP-Stuff/cSpigot-master/spigot-server-Patches/0210-Revert-to-PaperSpigot-strength-fix.patch

30 lines
1.1 KiB
Diff
Raw Normal View History

2023-05-01 20:59:40 +02:00
From f1745c32a798a5b093ec8c334f80f9b6d9dc10f4 Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com>
Date: Sat, 2 Sep 2017 10:38:11 -0400
Subject: [PATCH] Revert to PaperSpigot strength fix
diff --git a/src/main/java/net/minecraft/server/MobEffectAttackDamage.java b/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
index 8503c2c78..b1ac9196f 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,6 @@ public class MobEffectAttackDamage extends MobEffectList {
}
public double a(int i, AttributeModifier attributemodifier) {
- return amount * (double) (i + 1);
+ return this.id == MobEffectList.WEAKNESS.id ? (double) (PaperSpigotConfig.weaknessEffectModifier * (float) (i + 1)) : PaperSpigotConfig.strengthEffectModifier * (double) (i + 1);
}
}
--
2.13.3