mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 20:46:59 +01:00
0b952981e6
Vanilla now requires the use of WorldBorder#isInsideCloseToBorder to consider a border collision
21 lines
1.0 KiB
Diff
21 lines
1.0 KiB
Diff
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
|
|
index 225ad411a48c156bcd1973f97349db80b0ff6a92..32d97353a5f030fa46ea637e546ef0856122b391 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -2845,7 +2845,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
|
}
|
|
|
|
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;
|