From a88aa57ef0a60a83c514136dcd9a8cb2af567db7 Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Sat, 20 Jun 2020 18:35:15 +0100 Subject: [PATCH] Use the more concise method --- src/main/java/electroblob/wizardry/potion/PotionSlowTime.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/electroblob/wizardry/potion/PotionSlowTime.java b/src/main/java/electroblob/wizardry/potion/PotionSlowTime.java index 330f1a37..05a3f6b7 100644 --- a/src/main/java/electroblob/wizardry/potion/PotionSlowTime.java +++ b/src/main/java/electroblob/wizardry/potion/PotionSlowTime.java @@ -150,7 +150,7 @@ public class PotionSlowTime extends PotionMagicEffect implements ISyncedPotion { for(Entity entity : loadedEntityList){ if(entity.getEntityData().getBoolean(NBT_KEY)){ // Currently only players can cast slow time, but you could apply the effect to NPCs with commands - List nearby = EntityUtils.getEntitiesWithinRadius(getEffectRadius(), entity.posX, entity.posY, entity.posZ, entity.world, EntityLivingBase.class); + List nearby = EntityUtils.getLivingWithinRadius(getEffectRadius(), entity.posX, entity.posY, entity.posZ, entity.world); if(nearby.stream().noneMatch(e -> e.isPotionActive(WizardryPotions.slow_time))){ entity.getEntityData().removeTag(NBT_KEY); entity.updateBlocked = false;