From 21770104ecfa29779825520784e2062f663d9f22 Mon Sep 17 00:00:00 2001 From: Noah van der Aa Date: Tue, 6 Dec 2022 18:45:54 +0100 Subject: [PATCH] Limit pet look distance --- .../world/entity/ai/goal/FollowOwnerGoal.java.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java.patch diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java.patch new file mode 100644 index 0000000000..4cdf53ef91 --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java ++++ b/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java +@@ -72,7 +72,7 @@ + public void tick() { + boolean bl = this.tamable.shouldTryTeleportToOwner(); + if (!bl) { +- this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float)this.tamable.getMaxHeadXRot()); ++ if (this.tamable.distanceToSqr(this.owner) <= 16 * 16) this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float)this.tamable.getMaxHeadXRot()); // Paper - Limit pet look distance + } + + if (--this.timeToRecalcPath <= 0) {