diff options
author | Shane Freeder <[email protected]> | 2024-07-05 22:52:54 +0100 |
---|---|---|
committer | Shane Freeder <[email protected]> | 2024-07-05 22:52:54 +0100 |
commit | faf23b2076eaf78dfe625a91487e6af0b2e85eb7 (patch) | |
tree | e548d6e32511909be7aa7b47f6565a4448f383f6 /patches/server/0847-ExperienceOrb-should-call-EntitySpawnEvent.patch | |
parent | e21ab955f5759cd3eb804e5474d11da858a0795e (diff) | |
parent | 8d91b859cbeb64ecbc3916249fce26a085b320aa (diff) | |
download | Paper-faf23b2076eaf78dfe625a91487e6af0b2e85eb7.tar.gz Paper-faf23b2076eaf78dfe625a91487e6af0b2e85eb7.zip |
Merge remote-tracking branch 'origin/master' into chore/terminal
Diffstat (limited to 'patches/server/0847-ExperienceOrb-should-call-EntitySpawnEvent.patch')
-rw-r--r-- | patches/server/0847-ExperienceOrb-should-call-EntitySpawnEvent.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/patches/server/0847-ExperienceOrb-should-call-EntitySpawnEvent.patch b/patches/server/0847-ExperienceOrb-should-call-EntitySpawnEvent.patch new file mode 100644 index 0000000000..542bede5c4 --- /dev/null +++ b/patches/server/0847-ExperienceOrb-should-call-EntitySpawnEvent.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Golfing8 <[email protected]> +Date: Mon, 8 May 2023 09:18:17 -0400 +Subject: [PATCH] ExperienceOrb should call EntitySpawnEvent + + +diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +index 35b6443d15678ec84271dcebf29b98b36df97a6e..7b1de2fddd5ff236c477439142c6e38a580d7f56 100644 +--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java ++++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +@@ -736,7 +736,8 @@ public class CraftEventFactory { + // Spigot start - SPIGOT-7523: Merge after spawn event and only merge if the event was not cancelled (gets checked above) + if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) { + double radius = world.spigotConfig.expMerge; +- if (radius > 0) { ++ event = CraftEventFactory.callEntitySpawnEvent(entity); // Call spawn event for ExperienceOrb entities ++ if (radius > 0 && !event.isCancelled() && !entity.isRemoved()) { + // Paper start - Maximum exp value when merging; Whole section has been tweaked, see comments for specifics + final long maxValue = world.paperConfig().entities.behavior.experienceMergeMaxValue; + final boolean mergeUnconditionally = maxValue <= 0; |