Skip to content

Commit

Permalink
Remove extra check
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jan 25, 2021
1 parent ac106a6 commit 6c2f5fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main/src/main/java/net/citizensnpcs/trait/LookClose.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ public void run() {
t = randomLookDelay;
}
t--;
if (lookingAt != null && canSeeTarget()) {
Util.faceEntity(npc.getEntity(), lookingAt);
if (npc.getEntity().getType().name().equals("SHULKER")) {
NMS.setPeekShulker(npc.getEntity(), 100 - (int) Math
.floor(npc.getStoredLocation().distanceSquared(lookingAt.getLocation(PLAYER_LOCATION))));
}
if (lookingAt == null)
return;
Util.faceEntity(npc.getEntity(), lookingAt);
if (npc.getEntity().getType().name().equals("SHULKER")) {
NMS.setPeekShulker(npc.getEntity(), 100 - (int) Math
.floor(npc.getStoredLocation().distanceSquared(lookingAt.getLocation(PLAYER_LOCATION))));
}
}

Expand Down

0 comments on commit 6c2f5fa

Please sign in to comment.