2023-07-04 10:22:56 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
|
|
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
|
2024-08-31 20:29:50 +02:00
|
|
|
index 7d9ebc71b794d40246cbd43ff4de5795970e7ebe..3bb7e0f6a02b9b1726b8c878271d89a9c6d56c12 100644
|
2023-07-04 10:22:56 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
2024-07-29 00:28:28 +02:00
|
|
|
@@ -2687,7 +2687,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
2023-07-04 10:22:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public boolean startRiding(Entity entity, boolean force) {
|
|
|
|
- if (entity == this.vehicle) {
|
2024-01-18 18:52:00 +01:00
|
|
|
+ if (entity == this.vehicle || entity.level != this.level) { // Paper - Ensure entity passenger world matches ridden entity (bad plugins)
|
2023-07-04 10:22:56 +02:00
|
|
|
return false;
|
|
|
|
} else if (!entity.couldAcceptPassenger()) {
|
|
|
|
return false;
|