From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Spottedleaf 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 6025b45d1c247941d83cd9c2d516c14a70f64bfd..85fd7ad12e059f88bacf2d7c27715dcbd8fa3d4e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2610,7 +2610,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;