2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2019-09-24 23:16:16 +00:00
|
|
|
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).
|
|
|
|
|
2021-03-16 07:19:45 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/inventory/ContainerHorse.java b/src/main/java/net/minecraft/world/inventory/ContainerHorse.java
|
|
|
|
index ecabe8e52865b71b6f89d09850b37741e7e79b50..ea64ef313a8378fa7dee086e137e1e5f43376804 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/inventory/ContainerHorse.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/inventory/ContainerHorse.java
|
|
|
|
@@ -85,7 +85,7 @@ public class ContainerHorse extends Container {
|
2019-09-24 23:16:16 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean canUse(EntityHuman entityhuman) {
|
|
|
|
- return this.c.a(entityhuman) && this.d.isAlive() && this.d.g((Entity) entityhuman) < 8.0F;
|
2020-06-25 01:10:30 +00:00
|
|
|
+ return this.c.a(entityhuman) && (this.d.isAlive() && this.d.valid) && this.d.g((Entity) entityhuman) < 8.0F; // Paper - Fix MC-161754
|
2019-09-24 23:16:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|