aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--patches/server/0141-Entity-fromMobSpawner.patch14
-rw-r--r--patches/server/0281-Fixes-and-additions-to-the-spawn-reason-API.patch12
2 files changed, 25 insertions, 1 deletions
diff --git a/patches/server/0141-Entity-fromMobSpawner.patch b/patches/server/0141-Entity-fromMobSpawner.patch
index 0f1ce9369a..4afd9e1ed2 100644
--- a/patches/server/0141-Entity-fromMobSpawner.patch
+++ b/patches/server/0141-Entity-fromMobSpawner.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner()
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 46a21ed2408a42aafd16647e17e556730e799cbd..946f289e0e681524c6fde696921965dbdedda372 100644
+index 85d8c4865b65792b99f812b579d7c23823d76e52..0e800e3aeeec84f5f7ed0a391c9b66ae5689bd40 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -402,6 +402,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -48,6 +48,18 @@ index aa54237205989f619ac6a3faa2e4285427b9e31d..43d399e1a0ba2fb0541f851a28032fa6
// CraftBukkit start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
continue;
+diff --git a/src/main/java/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java b/src/main/java/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
+index 571756dacfa16f6755b67457e17969c35104f971..52d71a03cd5b2af56704f265ce5b5f14d3236ebb 100644
+--- a/src/main/java/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
++++ b/src/main/java/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
+@@ -225,6 +225,7 @@ public final class TrialSpawner {
+ optional1.ifPresent(entityinsentient::equip);
+ }
+
++ entity.spawnedViaMobSpawner = true; // Paper
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callTrialSpawnerSpawnEvent(entity, pos).isCancelled()) {
+ return Optional.empty();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index df6da730134da754d0ff23bd1b57c82486b9ab73..69b5946625a53a1351ffc4bdf61c6874949bbeae 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
diff --git a/patches/server/0281-Fixes-and-additions-to-the-spawn-reason-API.patch b/patches/server/0281-Fixes-and-additions-to-the-spawn-reason-API.patch
index 223d99ce64..944ab1ff65 100644
--- a/patches/server/0281-Fixes-and-additions-to-the-spawn-reason-API.patch
+++ b/patches/server/0281-Fixes-and-additions-to-the-spawn-reason-API.patch
@@ -201,6 +201,18 @@ index dbc0b69603dcffbf3d41d79719aa0f2b7da4a131..dd86f5ec5b2051aeea4e19ff97146362
.isPresent();
}
+diff --git a/src/main/java/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java b/src/main/java/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
+index 52d71a03cd5b2af56704f265ce5b5f14d3236ebb..ffca6563c20f53c92b162054fec727d83e54e58a 100644
+--- a/src/main/java/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
++++ b/src/main/java/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
+@@ -226,6 +226,7 @@ public final class TrialSpawner {
+ }
+
+ entity.spawnedViaMobSpawner = true; // Paper
++ entity.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.TRIAL_SPAWNER; // Paper - Entity#getEntitySpawnReason
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callTrialSpawnerSpawnEvent(entity, pos).isCancelled()) {
+ return Optional.empty();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index bddf98bdf60473eb1d2e533cf533ed7eee797aaa..ce70c8fddbe63d0af2b1f988ce9a2b40c5d48066 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java