From af019e9d328c70d1dd43a7232f7309de1af7a529 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 7 May 2022 08:48:29 -0700 Subject: [PATCH] Only log for passenger / vehicle world mismatch Exception thrown may corrupt passenger/vehicle state --- .../Ensure-entity-passenger-world-matches-ridden-entity.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patches/server/Ensure-entity-passenger-world-matches-ridden-entity.patch b/patches/server/Ensure-entity-passenger-world-matches-ridden-entity.patch index 64e58a0a7a..ae19c8bb22 100644 --- a/patches/server/Ensure-entity-passenger-world-matches-ridden-entity.patch +++ b/patches/server/Ensure-entity-passenger-world-matches-ridden-entity.patch @@ -15,7 +15,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 protected boolean addPassenger(Entity entity) { // CraftBukkit + // Paper start + if (entity.level != this.level) { -+ throw new IllegalArgumentException("Entity passenger world must match"); ++ LOGGER.error("Entity passenger world must match, cannot add " + entity + " as passenger to " + this, new Throwable()); ++ return false; + } + // Paper end if (entity == this) throw new IllegalArgumentException("Entities cannot become a passenger of themselves"); // Paper - issue 572