geforkt von Mirrors/Paper
Check horse entity validity in container interactions (#2584)
Fixes #2580
Dieser Commit ist enthalten in:
Ursprung
36cc95758b
Commit
ed4f937103
24
Spigot-Server-Patches/Fix-MC-161754.patch
Normale Datei
24
Spigot-Server-Patches/Fix-MC-161754.patch
Normale Datei
@ -0,0 +1,24 @@
|
||||
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/server/ContainerHorse.java b/src/main/java/net/minecraft/server/ContainerHorse.java
|
||||
index d1b9482d6..ad4e0a45c 100644
|
||||
--- a/src/main/java/net/minecraft/server/ContainerHorse.java
|
||||
+++ b/src/main/java/net/minecraft/server/ContainerHorse.java
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
--
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren