Paper/Spigot-Server-Patches/0579-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch
Aikar a70924789b
[Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
6917945f0 SPIGOT-6289: Fix setting entity equipment
2020-12-22 16:02:19 -05:00

20 lines
972 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/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index d86b67a63b37569fc4ca69ec04305a330950b0f2..0c952fea30aa6890809d728420e4710d95e10c19 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -3078,7 +3078,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
public Stream<Entity> cp() {
- return Stream.concat(Stream.of(this), this.passengers.stream().flatMap(Entity::cp));
+ return Stream.concat(Stream.of(this), com.google.common.collect.ImmutableList.copyOf(this.passengers).stream().flatMap(Entity::cp)); // Paper
}
public boolean hasSinglePlayerPassenger() {