From f5dd603274407b9677ddd4350f5fae9c434f8ab5 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Sat, 14 Aug 2021 03:01:07 -0700 Subject: [PATCH] [ci skip] Drop "Fix CME on adding a passenger in CreatureSpawnEvent" (#6384) This is no longer needed as Entity#passengers is an ImmutableList as of 1.17 --- ...ng-a-passenger-in-CreatureSpawnEvent.patch | 19 ------------------- ...ptimize-indirect-passenger-iteration.patch | 2 +- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 patches/server/Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch diff --git a/patches/server/Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch b/patches/server/Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch deleted file mode 100644 index d7d429bcf0..0000000000 --- a/patches/server/Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jason Penilla <11360596+jpenilla@users.noreply.github.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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/Entity.java -+++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n - } - - private Stream getIndirectPassengersStream() { -- return this.passengers.stream().flatMap(Entity::getSelfAndPassengers); -+ return ImmutableList.copyOf(this.passengers).stream().flatMap(Entity::getSelfAndPassengers); // Paper - } - - @Override diff --git a/patches/server/Optimize-indirect-passenger-iteration.patch b/patches/server/Optimize-indirect-passenger-iteration.patch index f3e5508474..4ba2c34830 100644 --- a/patches/server/Optimize-indirect-passenger-iteration.patch +++ b/patches/server/Optimize-indirect-passenger-iteration.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private Stream getIndirectPassengersStream() { + if (this.passengers.isEmpty()) { return Stream.of(); } // Paper - return ImmutableList.copyOf(this.passengers).stream().flatMap(Entity::getSelfAndPassengers); // Paper + return this.passengers.stream().flatMap(Entity::getSelfAndPassengers); } @Override