3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00
Paper/patches/server/0530-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch

20 Zeilen
934 B
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 d698fefd5d492bc6fe8b9e7d07108d6ba77d8576..f562f29193f30ac38112a1e9db45da4efe10eeb0 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<Entity> getIndirectPassengersStream() {
- return this.passengers.stream().flatMap(Entity::getSelfAndPassengers);
+ return ImmutableList.copyOf(this.passengers).stream().flatMap(Entity::getSelfAndPassengers); // Paper
}
@Override