mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
ExperienceOrb should call EntitySpawnEvent
This commit is contained in:
parent
4ced264ab6
commit
9fe671127a
1 changed files with 2 additions and 1 deletions
|
@ -744,7 +744,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;
|
||||
|
|
Loading…
Reference in a new issue