3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/Spigot-Server-Patches/0577-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch
Aikar 976c6d425b
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2021-05-02 15:37:24 -04:00

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 f1fa11217ab09133f4f19f5c73dfdab2f2b434e2..2a3025793db52a18e58f832c9da78c6c3b39d33c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3177,7 +3177,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() {