aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0141-Entity-fromMobSpawner.patch
diff options
context:
space:
mode:
authorLulu13022002 <[email protected]>2024-08-11 00:19:54 +0200
committerGitHub <[email protected]>2024-08-10 15:19:54 -0700
commit7d7f123e98e63d466f771e63eff33b9d615544fe (patch)
tree4a950183548b1d39670ae329037a365372eb851b /patches/server/0141-Entity-fromMobSpawner.patch
parent1cecc24cadd1ebae6299c8113d3378aaa93704c7 (diff)
downloadPaper-7d7f123e98e63d466f771e63eff33b9d615544fe.tar.gz
Paper-7d7f123e98e63d466f771e63eff33b9d615544fe.zip
Fix wrong spawn reason for trial spawners (#11229)
Diffstat (limited to 'patches/server/0141-Entity-fromMobSpawner.patch')
-rw-r--r--patches/server/0141-Entity-fromMobSpawner.patch14
1 files changed, 13 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