Skip to content

Commit

Permalink
comment out lookAtFunction because it's cursed
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 11, 2022
1 parent d8f5b7b commit 66a35d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -49,7 +49,7 @@ && getNPC().getNavigator().getTargetAsLocation().distanceSquared(targetLocation)
debug("Chase/location accepted, begin");
getNPC().getNavigator().setTarget(targetLocation.add(new Vector(SentinelUtilities.randomDecimal(-1, 1), 0, SentinelUtilities.randomDecimal(-1, 1))));
final Location entityEyeLoc = entity.getEyeLocation();
getNPC().getNavigator().getLocalParameters().lookAtFunction(n -> entityEyeLoc);
//getNPC().getNavigator().getLocalParameters().lookAtFunction(n -> entityEyeLoc);
}
else {
if (getNPC().getNavigator().getTargetType() == TargetType.ENTITY
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/mcmonkey/sentinel/SentinelTrait.java
Expand Up @@ -1220,14 +1220,14 @@ public void faceLocation(Location l) {
}
npc.faceLocation(faceTowards);
if (npc.getNavigator().isNavigating()) {
Function<Navigator, Location> altLookFunction = n -> faceTowards;
/*Function<Navigator, Location> altLookFunction = n -> faceTowards;
Function<Navigator, Location> origLookFunction = npc.getNavigator().getLocalParameters().lookAtFunction();
npc.getNavigator().getLocalParameters().lookAtFunction(altLookFunction);
Bukkit.getScheduler().scheduleSyncDelayedTask(SentinelPlugin.instance, () -> {
if (npc.getNavigator().isNavigating() && npc.getNavigator().getLocalParameters().lookAtFunction() == altLookFunction) {
npc.getNavigator().getLocalParameters().lookAtFunction(origLookFunction);
}
}, 2);
}, 2);*/
}
}

Expand Down

0 comments on commit 66a35d6

Please sign in to comment.