3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 19:10:09 +01:00
Paper/patches/server-remapped/0578-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch
Mariell Hoversholm a207d14a0e
Rename all patches to correct numbering scheme
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 15:46:44 +02: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 a623c22cd03ad92657e661851fddc76a30986755..90e9797cc1f3a4aa0a2bee28dca364e6f6dd0c0b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3180,7 +3180,7 @@ public abstract class Entity implements Nameable, CommandSource, net.minecraft.s
}
public Stream<Entity> getSelfAndPassengers() {
- return Stream.concat(Stream.of(this), this.passengers.stream().flatMap(Entity::getSelfAndPassengers));
+ return Stream.concat(Stream.of(this), com.google.common.collect.ImmutableList.copyOf(this.passengers).stream().flatMap(Entity::getSelfAndPassengers)); // Paper
}
public boolean hasOnePlayerPassenger() {