mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-11 09:23:42 +01:00
19 lines
972 B
Diff
19 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 ec3c6b20c87d253d07f70e8a8b9b909df3683b36..3309a3ea9dc895bc910238e10d993ff5f66d4240 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -3079,7 +3079,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() {
|