Paper/patches/server/0154-Ocelot-despawns-should...

20 lines
1.0 KiB
Diff
Raw Normal View History

2021-06-11 12:02:28 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 31 Jul 2017 01:54:40 -0500
Subject: [PATCH] Ocelot despawns should honor nametags and leash
diff --git a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
2021-06-12 11:18:01 +00:00
index 38ddb72b53fcf0d6a9331d23b11572e9f85e70e3..8104ac0f77e8e94f294b82f7badefccd72419223 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
2021-06-12 11:18:01 +00:00
@@ -133,7 +133,7 @@ public class Ocelot extends Animal {
2021-06-11 12:02:28 +00:00
@Override
public boolean removeWhenFarAway(double distanceSquared) {
- return !this.isTrusting() /*&& this.ticksLived > 2400*/; // CraftBukkit
+ return !this.isTrusting() && !this.hasCustomName() && !this.isLeashed() /*&& this.ticksLived > 2400*/; // CraftBukkit // Paper - honor name and leash
}
public static AttributeSupplier.Builder createAttributes() {