From 703c8e6d398b5ea467338fd84e996d7cb89b8289 Mon Sep 17 00:00:00 2001 From: Sollace Date: Tue, 20 Feb 2024 20:09:57 +0000 Subject: [PATCH] Fix cabbage lad crash #271 --- .../unicopia/entity/mob/IgnominiousBulbEntity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/mob/IgnominiousBulbEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/mob/IgnominiousBulbEntity.java index 82e99bf7..3da9137c 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/mob/IgnominiousBulbEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/mob/IgnominiousBulbEntity.java @@ -180,8 +180,10 @@ public class IgnominiousBulbEntity extends MobEntity { }); } } + + @Nullable LivingEntity target = getAttacker(); - if (!canTarget(target)) { + if (target == null || !canTarget(target)) { target = null; setAttacker(null); }