Paper/Spigot-Server-Patches/0206-Ocelot-despawns-should-honor-nametags-and-leash.patch
Shane Freeder 130b9a0a36
NOT FINISHED! 1.13-pre7 - even more patches!
Patches, patches everywhere!
2018-07-18 01:08:13 +01:00

23 lines
936 B
Diff

From 2cf62bc719ebd8587ce2ec6971c34c82273e0e63 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 6ea276aa0..720e7bbf9 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 {
}
protected boolean isTypeNotPersistent() {
- return !this.isTamed() /*&& this.ticksLived > 2400*/; // CraftBukkit
+ return !this.isTamed() && !this.hasCustomName() && !this.isLeashed() /*&& this.ticksLived > 2400*/; // CraftBukkit (ticks lived) - Paper (honor name and leash)
}
protected void initAttributes() {
--
2.18.0