Paper/patches/server/0345-Fix-MC-161754.patch
MiniDigger 4104545b11 remove system property for book size limits
"It was from a different time before books were as jank as they are now. As time has gone on they've only proven to be worse and worse."
2021-06-17 21:12:40 +02:00

24 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Tue, 24 Sep 2019 16:03:00 -0700
Subject: [PATCH] Fix MC-161754
Fixes https://github.com/PaperMC/Paper/issues/2580
We can use an entity valid check since this method is invoked for
each inventory iteraction (thanks to CB) and on player tick (vanilla).
diff --git a/src/main/java/net/minecraft/world/inventory/HorseInventoryMenu.java b/src/main/java/net/minecraft/world/inventory/HorseInventoryMenu.java
index 9da2f9334ea98ecba328c7b0d022321d6194529b..0d145f075798dde27beef80022cd7c0f582f8253 100644
--- a/src/main/java/net/minecraft/world/inventory/HorseInventoryMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/HorseInventoryMenu.java
@@ -95,7 +95,7 @@ public class HorseInventoryMenu extends AbstractContainerMenu {
@Override
public boolean stillValid(Player player) {
- return !this.horse.hasInventoryChanged(this.horseContainer) && this.horseContainer.stillValid(player) && this.horse.isAlive() && this.horse.distanceTo((Entity) player) < 8.0F;
+ return !this.horse.hasInventoryChanged(this.horseContainer) && this.horseContainer.stillValid(player) && (this.horse.isAlive() && this.horse.valid) && this.horse.distanceTo((Entity) player) < 8.0F; // Paper - Fix MC-161754
}
private boolean hasChest(AbstractHorse entityhorseabstract) {