Limit pet look distance

This commit is contained in:
Noah van der Aa 2022-12-06 18:45:54 +01:00
parent df65fbea3e
commit 21770104ec

View file

@ -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) {