2021-06-11 14:02:28 +02: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
|
2022-06-07 22:12:48 +02:00
|
|
|
index 4b9e3729279f3bfabab4227c511c4bf89488ff8c..6a459435493295ee5bb44fe2ba79cba6acea2e35 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
2022-03-01 06:43:03 +01:00
|
|
|
@@ -133,7 +133,7 @@ public class Ocelot extends Animal {
|
2021-06-11 14:02:28 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean removeWhenFarAway(double distanceSquared) {
|
2022-05-09 11:03:07 +02:00
|
|
|
- return !this.isTrusting() && this.tickCount > 2400;
|
|
|
|
+ return !this.isTrusting() && this.tickCount > 2400 && !this.hasCustomName() && !this.isLeashed(); // Paper - honor name and leash
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public static AttributeSupplier.Builder createAttributes() {
|