From 0ca5261a519a91e25365c0a90e8f5a190c460584 Mon Sep 17 00:00:00 2001 From: maxanier Date: Sat, 21 Oct 2023 13:02:29 +0200 Subject: [PATCH] Prevent hunter mobs from taking revenge when hit by another hunter mob. Closes #1270 --- .../teamlapen/vampirism/entity/hunter/BasicHunterEntity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/teamlapen/vampirism/entity/hunter/BasicHunterEntity.java b/src/main/java/de/teamlapen/vampirism/entity/hunter/BasicHunterEntity.java index ad45e5b290..ec69086d35 100644 --- a/src/main/java/de/teamlapen/vampirism/entity/hunter/BasicHunterEntity.java +++ b/src/main/java/de/teamlapen/vampirism/entity/hunter/BasicHunterEntity.java @@ -7,6 +7,7 @@ import de.teamlapen.vampirism.api.entity.actions.EntityActionTier; import de.teamlapen.vampirism.api.entity.actions.IEntityActionUser; import de.teamlapen.vampirism.api.entity.hunter.IBasicHunter; +import de.teamlapen.vampirism.api.entity.hunter.IHunterMob; import de.teamlapen.vampirism.api.entity.hunter.IVampirismCrossbowUser; import de.teamlapen.vampirism.api.items.IVampirismCrossbow; import de.teamlapen.vampirism.api.world.ICaptureAttributes; @@ -507,7 +508,7 @@ protected void registerGoals() { this.goalSelector.addGoal(8, new LookAtPlayerGoal(this, VampireBaseEntity.class, 17F)); this.goalSelector.addGoal(8, new RandomLookAroundGoal(this)); - this.targetSelector.addGoal(1, new HurtByTargetGoal(this)); + this.targetSelector.addGoal(1, new HurtByTargetGoal(this, IHunterMob.class)); this.targetSelector.addGoal(2, new AttackVillageGoal<>(this)); this.targetSelector.addGoal(2, new DefendVillageGoal<>(this));//Should automatically be mutually exclusive with attack village this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Player.class, 5, true, false, VampirismAPI.factionRegistry().getPredicate(getFaction(), true, false, false, false, null)));