mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
da9d110d5b
This patch does not appear to be doing anything useful, and may hide errors. Currently, the save logic does not run through this path either so it did not do anything. Additionally, properly implement support for handling RegionFileSizeException in Moonrise.
21 lines
1.4 KiB
Diff
21 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Golfing8 <atroo@me.com>
|
|
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 28e56095ec4b6fb73df747ec796498f8692c2a24..b1ce440bc5c8b77654213a4630851daef3f15d60 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
@@ -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;
|