diff --git a/src/main/java/io/redspace/ironsspellbooks/effect/TrueInvisibilityEffect.java b/src/main/java/io/redspace/ironsspellbooks/effect/TrueInvisibilityEffect.java index c4e82173f..4fd7f06e9 100644 --- a/src/main/java/io/redspace/ironsspellbooks/effect/TrueInvisibilityEffect.java +++ b/src/main/java/io/redspace/ironsspellbooks/effect/TrueInvisibilityEffect.java @@ -10,6 +10,7 @@ import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.ai.attributes.AttributeMap; import net.minecraft.world.entity.ai.goal.WrappedGoal; +import net.minecraft.world.entity.ai.memory.MemoryModuleType; import net.minecraft.world.entity.ai.targeting.TargetingConditions; import net.minecraft.world.entity.player.Player; @@ -40,6 +41,7 @@ public void addAttributeModifiers(LivingEntity livingEntity, AttributeMap pAttri entityTargetingCaster.setLastHurtMob(null); entityTargetingCaster.setLastHurtByMob(null); entityTargetingCaster.targetSelector.getAvailableGoals().forEach(WrappedGoal::stop); + entityTargetingCaster.getBrain().eraseMemory(MemoryModuleType.ATTACK_TARGET); }); this.lastHurtTimestamp = livingEntity.getLastHurtMobTimestamp();