[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 2021-08-14 03:01:07 -07:00 committed by GitHub
parent f12a7f57e1
commit 4dd33cb8b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
215 changed files with 27 additions and 46 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 c9a4598f9856b82f852d79c7c1e33767bc590c21..10cc9daf2a6d29c1148b7ead70a21b29c4ae5d24 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3436,7 +3436,7 @@ 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

@ -41,7 +41,7 @@ index e2e6652fc227173b69580dba74855c3ed8884a3b..2c23712aadfe32439ae014c62aa16f1b
@Override @Override
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 5e5465b8d9b4187a11e7952515ef040ab997d902..078c4e9e4a2ff9009242f44eeec68421b8d99ac0 100644 index a1cac393ece249e5f18fbc0db6a7ad9f14dfb3a1..9e5dce23121b4fc3e32f2b2702c0c6959dcd18cf 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -209,7 +209,7 @@ public class CraftBlock implements Block { @@ -209,7 +209,7 @@ public class CraftBlock implements Block {

View File

@ -25,7 +25,7 @@ index 7f6405ac44fef423dc8b21f3dbeaae26a1005077..bdd4f4db9849d9107b5c62d5e83b1277
Connection.LOGGER.debug("Failed to sent packet", throwable); Connection.LOGGER.debug("Failed to sent packet", throwable);
ConnectionProtocol enumprotocol = this.getCurrentProtocol(); ConnectionProtocol enumprotocol = this.getCurrentProtocol();
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 779408573c779f86f61667f8cde8fbd2f7d2956f..2310ad5d89f9184d11c3f2d8de211425b81858df 100644 index f3e4b9f302fbc4b615a5e735d5aab0f403e16903..84ef1c60223d421cf515c07342d2296e477dd4b7 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -262,6 +262,7 @@ public class ServerPlayer extends Player { @@ -262,6 +262,7 @@ public class ServerPlayer extends Player {

View File

@ -18,7 +18,7 @@ index b9f6f8441cafeb3e64ce7943bfd1e92fe983a5c5..f8b917b2d1a1744f7a6c3b9cf60be417
Player respawnPlayer = entityplayer1.getBukkitEntity(); Player respawnPlayer = entityplayer1.getBukkitEntity();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 6fc9b8a3daf9ecf3d4231ea872d62025d04a394e..59543c88dcde9d2056bb481383a2784be0637ae8 100644 index 4ed31e1aae61bdcc498dc7c536f8a3353e20c7d4..ae396e3ec6c5506ed49b5e80cf236d7d2128cee1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -378,7 +378,7 @@ public class CraftWorld implements World { @@ -378,7 +378,7 @@ public class CraftWorld implements World {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Add Destroy Speed API
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index d936a86d5a95b4502944f9e76cc86d395c6dd4b8..9ec29486316012931e4547625801049eab806209 100644 index 9e5dce23121b4fc3e32f2b2702c0c6959dcd18cf..354ed68bad64277a9566d4dfdd8808260f145458 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -782,5 +782,23 @@ public class CraftBlock implements Block { @@ -782,5 +782,23 @@ public class CraftBlock implements Block {

View File

@ -21,7 +21,7 @@ index 935bb237f8ecd63ca4cec64a7c7a341c9d3358e5..208690ceca2485b54acde5123ba494d7
private void keepLoadedRange() { private void keepLoadedRange() {
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 10cc9daf2a6d29c1148b7ead70a21b29c4ae5d24..184e88db63012cab509a52aee0245881791fa87d 100644 index c9a4598f9856b82f852d79c7c1e33767bc590c21..e72477c55f6dd932bdd1b692470ddc701da9caaa 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1723,6 +1723,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -1723,6 +1723,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@ -61,7 +61,7 @@ index 8fb89326395a7e70982c0d757b506565e98b12a4..a060cca08631fb42041e3a79a9abc422
} else if (entity.level.isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) { } else if (entity.level.isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) {
return false; return false;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 8a0722455bf303f50b2955b53f9d7284a20f672e..e159d6c77860790c20ca7b531ed23ffda0380810 100644 index 0c7ed53964675c81185644549898369cdda80377..3227ce58391b93c12dd01e2b73a3a6c5d6062827 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3277,7 +3277,7 @@ public abstract class LivingEntity extends Entity { @@ -3277,7 +3277,7 @@ public abstract class LivingEntity extends Entity {

View File

@ -41,7 +41,7 @@ index b30c08bfb8c55161543a4ef09f2e462e0a1fe4ae..ec93f5300cc7d423ec0d292f0f8443f9
public Vec3 updateEntityPosition(Vec3 orig) { public Vec3 updateEntityPosition(Vec3 orig) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 184e88db63012cab509a52aee0245881791fa87d..bdc6a1adccc7fa29d83799609d45e03116c6d4b9 100644 index e72477c55f6dd932bdd1b692470ddc701da9caaa..f618490fe7eb56389e86e3c6dca1d223d38c0bb0 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3759,6 +3759,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -3759,6 +3759,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add OBSTRUCTED reason to BedEnterResult
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 69a4795266b40c3cd113b13300bb7bbdcf842496..8818a2d971615234a29710eb3cff2153f5896518 100644 index c96953ab3f358c7c67297532cd6740ff3ff61aa3..2cab0a3eb489f1f36bb7eaae2706e3b4518668ce 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -257,6 +257,10 @@ public class CraftEventFactory { @@ -257,6 +257,10 @@ public class CraftEventFactory {

View File

@ -9,7 +9,7 @@ process to do this in the Bukkit API
Adds API for buildable, replaceable, burnable too. Adds API for buildable, replaceable, burnable too.
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 24f2eba1c39abce074740d928640dd0dd30f27db..3386fa8eaa890a7353ee152f27a313ee358ecb52 100644 index 354ed68bad64277a9566d4dfdd8808260f145458..ef3d93ba8b4149aa479abc6e9787a8746f60ce1d 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -618,6 +618,25 @@ public class CraftBlock implements Block { @@ -618,6 +618,25 @@ public class CraftBlock implements Block {

View File

@ -18,7 +18,7 @@ index 2fb45e48cc5845c71cca21c43bb012f3eb6a0b53..5ef649dec31ba6d6b74a7bd757727ffd
this.interactResult = event.useItemInHand() == Event.Result.DENY; this.interactResult = event.useItemInHand() == Event.Result.DENY;
this.interactPosition = blockposition.immutable(); this.interactPosition = blockposition.immutable();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index f5e83d82940602ef7733fbc61077c42c72da74bd..67c3405264fda2f7ce2b9822f8e0a8da71998677 100644 index f960ee7644ed792c4136cbcb75cc12e8dbed65c4..00426ffa3da994aed445f0767a99b83154773e10 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -55,7 +55,9 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams; @@ -55,7 +55,9 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams;

View File

@ -28,7 +28,7 @@ index 4227e7fc46e22265316b42bbdb166d60e5aed94e..3d16e4a6bf842a209c760fd89f8edf99
public int wanderingTraderSpawnDayTicks = 24000; public int wanderingTraderSpawnDayTicks = 24000;
public int wanderingTraderSpawnChanceFailureIncrement = 25; public int wanderingTraderSpawnChanceFailureIncrement = 25;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index bdc6a1adccc7fa29d83799609d45e03116c6d4b9..08428a1aa9e9f007415d29c653b8885b09ab3b19 100644 index f618490fe7eb56389e86e3c6dca1d223d38c0bb0..8e530b22413764470dcf5862c1a3ef8e504a124f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1606,6 +1606,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -1606,6 +1606,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n

View File

@ -29,7 +29,7 @@ index 4223d4610b4fec588980dba2ea5ec4f04c45d945..fd2b301bda95438bc7e48173bbe74aec
return new Throwable(entity + " Added to world at " + new java.util.Date()); return new Throwable(entity + " Added to world at " + new java.util.Date());
} }
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index e159d6c77860790c20ca7b531ed23ffda0380810..fdf0c39111059d7030cfc1eddfdcdda375bd2640 100644 index 3227ce58391b93c12dd01e2b73a3a6c5d6062827..f0a2e27c21b0fd9df236a0a145c7cbf37661fa7d 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3223,6 +3223,20 @@ public abstract class LivingEntity extends Entity { @@ -3223,6 +3223,20 @@ public abstract class LivingEntity extends Entity {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Allow adding items to BlockDropItemEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index b2ef3b767957f961b3c47db73fba3ee9dab226be..d01d4ca873f8225d3503ecb102ce2eb7bfced421 100644 index 7c68b15c432084adf069797cfccb0526055796cb..db6c0917824b9127abd9f9250dc195a9f1d56f4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -390,13 +390,30 @@ public class CraftEventFactory { @@ -390,13 +390,30 @@ public class CraftEventFactory {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Add support for hex color codes in console
Converts upstream's hex color code legacy format into actual hex color codes in the console. Converts upstream's hex color code legacy format into actual hex color codes in the console.
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index 10b1689ef6b724df07074e7069f2620fede3cacc..f57faf4c4587f7a10c05038d6b358871a905039c 100644 index 31a6e07981f20fc0cedbca24cf65807e50ab8142..c95e5f2fee54be09b16c26daffdfcfda877ec203 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -28,6 +28,7 @@ dependencies { @@ -28,6 +28,7 @@ dependencies {

Some files were not shown because too many files have changed in this diff Show More