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
|
2023-11-04 20:20:01 +01:00
|
|
|
index 1bdc0c95d1f739ce7fc664cc9f7e561e7565e9d4..c453351b3734320bef991880743245e8e69d3e86 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
|
2023-11-03 15:05:57 +01:00
|
|
|
@@ -2841,7 +2841,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
2023-07-04 10:22:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public boolean startRiding(Entity entity, boolean force) {
|
|
|
|
- if (entity == this.vehicle) {
|
|
|
|
+ if (entity == this.vehicle || entity.level != this.level) { // Paper - check level
|
|
|
|
return false;
|
|
|
|
} else if (!entity.couldAcceptPassenger()) {
|
|
|
|
return false;
|