Skip to content

Commit

Permalink
Update TrueInvisibilityEffect.java
Browse files Browse the repository at this point in the history
  • Loading branch information
iron431 committed Aug 10, 2024
1 parent 6d45387 commit c276251
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit c276251

Please sign in to comment.