From 0df40ed8d9e9ef72978b6c996ea285fcbf852e0b Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 6 Nov 2024 20:27:44 +1100 Subject: [PATCH] SPIGOT-7947: addPassenger doesn't work if the vehicle is a player By: md_5 --- .../nms-patches/net/minecraft/world/entity/Entity.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/paper-server/nms-patches/net/minecraft/world/entity/Entity.patch b/paper-server/nms-patches/net/minecraft/world/entity/Entity.patch index efa2e3e16c..317981d911 100644 --- a/paper-server/nms-patches/net/minecraft/world/entity/Entity.patch +++ b/paper-server/nms-patches/net/minecraft/world/entity/Entity.patch @@ -620,6 +620,15 @@ leashable.setLeashedTo(entityhuman, true); } +@@ -2243,7 +2596,7 @@ + return false; + } else if (!entity.couldAcceptPassenger()) { + return false; +- } else if (!this.level().isClientSide() && !entity.type.canSerialize()) { ++ } else if (!flag && !this.level().isClientSide() && !entity.type.canSerialize()) { // SPIGOT-7947: Allow force riding all entities + return false; + } else { + for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) { @@ -2255,6 +2608,27 @@ if (!flag && (!this.canRide(entity) || !entity.canAddPassenger(this))) { return false;