mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Limit pet look distance
This commit is contained in:
parent
df65fbea3e
commit
21770104ec
1 changed files with 11 additions and 0 deletions
|
@ -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) {
|
Loading…
Reference in a new issue