diff options
Diffstat (limited to 'patches/unapplied/server/0677-Ensure-entity-passenger-world-matches-ridden-entity.patch')
-rw-r--r-- | patches/unapplied/server/0677-Ensure-entity-passenger-world-matches-ridden-entity.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/patches/unapplied/server/0677-Ensure-entity-passenger-world-matches-ridden-entity.patch b/patches/unapplied/server/0677-Ensure-entity-passenger-world-matches-ridden-entity.patch new file mode 100644 index 0000000000..9e576da81a --- /dev/null +++ b/patches/unapplied/server/0677-Ensure-entity-passenger-world-matches-ridden-entity.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Spottedleaf <[email protected]> +Date: Thu, 31 Mar 2022 05:11:37 -0700 +Subject: [PATCH] Ensure entity passenger world matches ridden entity + +Bad plugins doing this would cause some obvious problems... + +diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java +index 775243c5a2c44300c00f4f674f40d6793f5a797d..4f9071362d556f6f7fd5948dab99e2d260ec60fd 100644 +--- a/src/main/java/net/minecraft/world/entity/Entity.java ++++ b/src/main/java/net/minecraft/world/entity/Entity.java +@@ -2803,7 +2803,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + + public boolean startRiding(Entity entity, boolean force) { +- if (entity == this.vehicle) { ++ if (entity == this.vehicle || entity.level != this.level) { // Paper - Ensure entity passenger world matches ridden entity (bad plugins) + return false; + } else if (!entity.couldAcceptPassenger()) { + return false; |