Skip to content

Commit

Permalink
Prevent hunter mobs from taking revenge when hit by another hunter mob.
Browse files Browse the repository at this point in the history
Closes #1270
  • Loading branch information
maxanier committed Oct 21, 2023
1 parent 53fed6f commit 0ca5261
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)));
Expand Down

0 comments on commit 0ca5261

Please sign in to comment.