Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 03:20:07 +01:00
0cdce89d59
If a playerdata doesn't contain a valid, loaded world, reset to the main world spawn point
21 Zeilen
1.0 KiB
Diff
21 Zeilen
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 8b23d7dcfc4a877ec5332c8fce94db1375a3e2dd..da90572d7f258ff9035cbae4f85df4e256bebaa1 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -2820,7 +2820,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
|
}
|
|
|
|
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;
|