mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-18 03:16:37 +01:00
We will now store the world ID. It may not be used if the entity is loaded before the world in question is, but it might be used later on, should the entity come after the world. Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
19 lines
1 KiB
Diff
19 lines
1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: jmp <jasonpenilla2@me.com>
|
|
Date: Sun, 4 Oct 2020 19:55:25 -0700
|
|
Subject: [PATCH] Fix CME on adding a passenger in CreatureSpawnEvent
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index 35b2e8dba3536febe997f3c562c56f0d5371a524..7f212d7471e96e91b990cc5432216b2c1e8fb01f 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -3187,7 +3187,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
|
}
|
|
|
|
public Stream<Entity> recursiveStream() {
|
|
- return Stream.concat(Stream.of(this), this.passengers.stream().flatMap(Entity::recursiveStream));
|
|
+ return Stream.concat(Stream.of(this), com.google.common.collect.ImmutableList.copyOf(this.passengers).stream().flatMap(Entity::recursiveStream)); // Paper
|
|
}
|
|
|
|
public boolean hasSinglePlayerPassenger() {
|