mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-28 03:01:31 +01:00
Fix leashed pets teleporting to owner when loaded (#9686)
This commit is contained in:
parent
e0964c727a
commit
a624543c95
@ -57,6 +57,12 @@ https://bugs.mojang.com/browse/MC-84789
|
|||||||
https://bugs.mojang.com/browse/MC-225381
|
https://bugs.mojang.com/browse/MC-225381
|
||||||
Fix overfilled bundles duplicating items / being filled with air
|
Fix overfilled bundles duplicating items / being filled with air
|
||||||
|
|
||||||
|
https://bugs.mojang.com/browse/MC-173303
|
||||||
|
Fix leashed pets teleporting to owner when loaded
|
||||||
|
|
||||||
|
== AT ==
|
||||||
|
public net/minecraft/world/entity/Mob leashInfoTag
|
||||||
|
|
||||||
Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
|
Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||||
@ -198,6 +204,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
if (this.mob.getRandom().nextInt(this.mob.isBaby() ? 50 : 1000) != 0) {
|
if (this.mob.getRandom().nextInt(this.mob.isBaby() ? 50 : 1000) != 0) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
|
||||||
|
@@ -0,0 +0,0 @@ public class FollowOwnerGoal extends Goal {
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean unableToMove() {
|
||||||
|
- return this.tamable.isOrderedToSit() || this.tamable.isPassenger() || this.tamable.isLeashed();
|
||||||
|
+ return this.tamable.isOrderedToSit() || this.tamable.isPassenger() || this.tamable.isLeashed() || this.tamable.leashInfoTag != null; // Paper - Fix MC-173303
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/SwellGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/SwellGoal.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/SwellGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/SwellGoal.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/SwellGoal.java
|
--- a/src/main/java/net/minecraft/world/entity/ai/goal/SwellGoal.java
|
||||||
|
Loading…
Reference in New Issue
Block a user