Skip to content

Commit

Permalink
r
Browse files Browse the repository at this point in the history
  • Loading branch information
seymourimadeit committed Apr 28, 2024
1 parent f38eb33 commit 2be7a03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/tallestegg/guardvillagers/HandlerEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public static void onLivingSpawned(EntityJoinLevelEvent event) {
golem.goalSelector.addGoal(0, new GetOutOfWaterGoal(golem, 1.0D));
}

if (mob instanceof Zombie zombie) {
if (mob instanceof Zombie zombie && !(zombie instanceof ZombifiedPiglin)) {
zombie.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(zombie, Guard.class, false));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ public boolean canContinueToUse() {
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Ravager.class, true)); // To make witches and ravagers have a priority than other mobs this has to be done
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Witch.class, true));
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Raider.class, true));
this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, Zombie.class, true));
this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, Zombie.class, true, (mob) -> !(mob instanceof ZombifiedPiglin)));
}
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Mob.class, 5, true, true, (mob) -> GuardConfig.COMMON.MobWhiteList.get().contains(mob.getEncodeId())));
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt));
Expand Down

0 comments on commit 2be7a03

Please sign in to comment.