2019-12-13 23:41:00 +01:00
|
|
|
From 540b6207ac043f0b18905843b06ac9b2f31c6ef7 Mon Sep 17 00:00:00 2001
|
2019-09-25 01:16:16 +02: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).
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ContainerHorse.java b/src/main/java/net/minecraft/server/ContainerHorse.java
|
2019-12-12 17:20:43 +01:00
|
|
|
index c95ce0124..18e1ae7f0 100644
|
2019-09-25 01:16:16 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/ContainerHorse.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/ContainerHorse.java
|
|
|
|
@@ -76,7 +76,7 @@ public class ContainerHorse extends Container {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean canUse(EntityHuman entityhuman) {
|
|
|
|
- return this.c.a(entityhuman) && this.d.isAlive() && this.d.g((Entity) entityhuman) < 8.0F;
|
|
|
|
+ return this.c.a(entityhuman) && (this.d.isAlive() && this.d.valid) && this.d.g((Entity) entityhuman) < 8.0F; // Paper - Fix MC-161754
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
--
|
2019-12-12 17:20:43 +01:00
|
|
|
2.24.1
|
2019-09-25 01:16:16 +02:00
|
|
|
|