From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: jmp 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 24d955c436b4ecf95a0bd0b0ff30b3794df9798e..e0d98ed993414f5834dcbd4c4b482209a5cb4188 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -3434,7 +3434,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n } private Stream getIndirectPassengersStream() { - return this.passengers.stream().flatMap(Entity::getSelfAndPassengers); + return ImmutableList.copyOf(this.passengers).stream().flatMap(Entity::getSelfAndPassengers); // Paper } @Override