mirror of
https://github.com/PaperMC/Paper.git
synced 2024-07-15 08:05:35 +02:00
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 312281ea PR-742: Make World implement Keyed CraftBukkit Changes: 2ac7fa7a SPIGOT-7014: getLootTable API should not persistently update loot table 7fdd7941 PR-1046: Make World implement Keyed 7bc728a6 PR-1045: Revert changes to persistence required checks Spigot Changes: b6d12d17 Rebuild patches
20 lines
1001 B
Diff
20 lines
1001 B
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 e77ca38bc6accf5c7a569a7144d02cadbb02d78a..fc2c18a3bfd395882a5f4a08c23b382845d9ccd2 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
|
@@ -133,7 +133,7 @@ public class Ocelot extends Animal {
|
|
|
|
@Override
|
|
public boolean removeWhenFarAway(double distanceSquared) {
|
|
- return !this.isTrusting() && this.tickCount > 2400;
|
|
+ return !this.isTrusting() && this.tickCount > 2400 && !this.hasCustomName() && !this.isLeashed(); // Paper - honor name and leash
|
|
}
|
|
|
|
public static AttributeSupplier.Builder createAttributes() {
|