geforkt von Mirrors/Paper
20 Zeilen
1.0 KiB
Diff
20 Zeilen
1.0 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 d072e3fb26f32db80be68f0e23526e34f57ff331..0841cf7e968a8a3b577e91f6dcd0487169474329 100644
|
||
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||
|
@@ -3182,7 +3182,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() {
|