Переглянути джерело

Attempted fix for CombatTag dupe glitch - don't apply AoE damage to
NPCs.

gmcferrin 12 роки тому
батько
коміт
ec6b9d4387
1 змінених файлів з 6 додано та 0 видалено
  1. 6 0
      src/main/java/com/gmail/nossr50/util/Combat.java

+ 6 - 0
src/main/java/com/gmail/nossr50/util/Combat.java

@@ -335,6 +335,12 @@ public class Combat {
         }
 
         for (Entity entity : target.getNearbyEntities(2.5, 2.5, 2.5)) {
+            if (entity instanceof Player) {
+                if (Misc.isCitizensNPC((Player) entity)) {
+                    continue;
+                }
+            }
+
             if (!(entity instanceof LivingEntity)) {
                 continue;
             }