Skip to content

Commit

Permalink
Fixed cockatrice targeting players in spectator mode Resolves AlexMod…
Browse files Browse the repository at this point in the history
…Guy#4069, AlexModGuy#3987

 TODO: Make cockatrice patrol an area AlexModGuy#3660
  • Loading branch information
TheBv committed Oct 14, 2021
1 parent fd3dcdf commit e8fd121
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public boolean apply(@Nullable Entity entity) {
}));
this.goalSelector.removeGoal(aiMelee);
}

//TODO: Make cockatrice patrol an area
public boolean detachHome() {
return this.hasHomePosition && this.getCommand() == 3 || super.detachHome();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void resetTask() {
* Returns whether an in-progress Goal should continue executing
*/
public boolean shouldContinueExecuting() {
if (this.player != null && !this.player.isCreative()) {
if (this.player != null && !this.player.isCreative() && !this.player.isSpectator()) {
if (!EntityGorgon.isEntityLookingAt(this.player, this.cockatrice, 0.4F)) {
return false;
} else {
Expand Down

0 comments on commit e8fd121

Please sign in to comment.