mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 21:17:32 +00:00
Fix Counter Damage Logic to Support DBC Addon
This commit is contained in:
1 parent
790b84e7d3
commit
34b3d9365a
1 file changed
+1
-2
@@ -7,7 +7,6 @@ import noppes.npcs.controllers.AnimationController;
|
||||
import kamkeel.npcs.controllers.data.ability.enums.UserType;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.controllers.data.Animation;
|
||||
import noppes.npcs.api.ability.type.IAbilityCounter;
|
||||
@@ -65,7 +64,7 @@ public class AbilityCounter extends AbilityDefend implements IAbilityCounter {
|
||||
protected float performDefend(EntityLivingBase attacker, float amount) {
|
||||
// For PERCENT mode with DBC, use the full DBC-calculated damage, not vanilla base
|
||||
float incomingDamage = amount;
|
||||
if (DBCAddon.IsAvailable() && attacker instanceof EntityPlayer) {
|
||||
if (DBCAddon.IsAvailable()) {
|
||||
incomingDamage = DBCAddon.instance.getAttackerDBCDamage(amount);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user