[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
This commit is contained in:
Jason Penilla 2021-08-14 03:01:07 -07:00
parent b230147e18
commit f5dd603274
2 changed files with 1 additions and 20 deletions

View File

@ -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<Entity> getIndirectPassengersStream() {
- return this.passengers.stream().flatMap(Entity::getSelfAndPassengers);
+ return ImmutableList.copyOf(this.passengers).stream().flatMap(Entity::getSelfAndPassengers); // Paper
}
@Override

View File

@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
private Stream<Entity> 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