13
0
geforkt von Mirrors/Paper
Paper/Spigot-Server-Patches/0580-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch
Jake Potrebic 899bc53b79
Updated Upstream (Bukkit/CraftBukkit) (#4779)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
f47abd88 SPIGOT-6242: Fix some file line endings
de96535b SPIGOT-6234: enum classes don't serialize properly when implementing ConfigurationSerializable

CraftBukkit Changes:
4475707d SPIGOT-6244: /spawnpoint ignores angle
8b3b096d SPIGOT-6242: Fix some file line endings
4b33c749 SPIGOT-6186: Canceling a CreatureSpawnEvent​ results in a "Unable to summon entity due to duplicate UUIDs" error
2b3ca726 SPIGOT-6236: Vehicle passenger portal cooldown does not change
2020-11-17 22:45:18 -05:00

20 Zeilen
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() {