Paper/Spigot-Server-Patches/0197-Ocelot-despawns-should-honor-nametags-and-leash.patch
Zach Brown 8ed2992da9
Make scan-for-legacy-ender-dragon config work again
Portion of diff was dropped in the mappings update commit.

Also remove the option to remove invalid statistics. The server will
automatically do this now as of... 1.13?, our option wasn't even doing anything.
2018-12-14 20:17:27 -05:00

23 lines
919 B
Diff

From 57f01552ff909b09dde2830a199e523ebf74d855 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/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java
index 9fc35730a..2a5a5516a 100644
--- a/src/main/java/net/minecraft/server/EntityOcelot.java
+++ b/src/main/java/net/minecraft/server/EntityOcelot.java
@@ -61,7 +61,7 @@ public class EntityOcelot extends EntityTameableAnimal {
}
public boolean isTypeNotPersistent() {
- return !this.isTamed() /*&& this.ticksLived > 2400*/; // CraftBukkit
+ return !this.isTamed() && !this.hasCustomName() && !this.isLeashed() /*&& this.ticksLived > 2400*/; // CraftBukkit - Paper (honor name and leash)
}
protected void initAttributes() {
--
2.20.0