File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
leaf-server/minecraft-patches/features Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1411,7 +1411,7 @@ index fb160a59c873d5c3f2c3d31966ca1a653f1b384d..96ccafe979c5c15e26c12f6ca98ad1e8
14111411 return this.potentialTarget != null && !(this.potentialTarget instanceof Player player1 && (player1.isSpectator() || player1.isCreative()));
14121412 }
14131413diff --git a/net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java b/net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java
1414- index a8ec1d5f4b0fb0ff26a234235b7d8d9c4b4a2a98..412fc8e049ba3763314ec2a56dce378cb0e4cc5f 100644
1414+ index a8ec1d5f4b0fb0ff26a234235b7d8d9c4b4a2a98..c2b4bc95ee4cb4167c06556b14656c0fa59051a3 100644
14151415--- a/net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java
14161416+++ b/net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java
14171417@@ -73,6 +73,46 @@ public class HurtByTargetGoal extends TargetGoal {
@@ -1485,9 +1485,9 @@ index a8ec1d5f4b0fb0ff26a234235b7d8d9c4b4a2a98..412fc8e049ba3763314ec2a56dce378c
14851485
14861486+ // Leaf start - Async target finding
14871487+ public void poll() {
1488- + if (!(this.mob.getGoalCtx().result() instanceof List toAlert)) return;
1488+ + if (!(this.mob.getGoalCtx().result() instanceof List<?> toAlert)) return;
14891489+ LivingEntity lastHurtByMob = this.mob.getLastHurtByMob();
1490- + if (lastHurtByMob.getType() == EntityType.PLAYER && getServerLevel(this.mob).getGameRules().getBoolean(GameRules.RULE_UNIVERSAL_ANGER)) {
1490+ + if (lastHurtByMob == null || (lastHurtByMob .getType() == EntityType.PLAYER && getServerLevel(this.mob).getGameRules().getBoolean(GameRules.RULE_UNIVERSAL_ANGER) )) {
14911491+ return;
14921492+ }
14931493+ for (Class<?> clazz : this.toIgnoreDamage) {
You can’t perform that action at this time.
0 commit comments