Paper/patches/server-remapped/0164-Ocelot-despawns-should-honor-nametags-and-leash.patch
Mariell Hoversholm a207d14a0e
Rename all patches to correct numbering scheme
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 15:46:44 +02:00

20 lines
1 KiB
Diff

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
index 1b820ca48845cbe4a668cc31582c2ddf6d50c96a..142025cfb75b24dc6df8160f4922086404efa6a7 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
@@ -128,7 +128,7 @@ public class Ocelot extends Animal {
@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() {