mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-03 01:10:37 +01:00
6f2009754d
At the time this was re-added, there was concern around how the JIT would handle the system property that enabled it. This shouldn't be a problem, and as such we no longer need to block access to it. The Vanilla Method Profiler will not provide much to most users however there is no harm in providing it as an option. For most users, the recommended and supported method for determining performance issues with Paper will continue to be Timings.
26 lines
1.5 KiB
Diff
26 lines
1.5 KiB
Diff
From 1f708df86d0848f78966d930eda728832f4f3b2b Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Tue, 19 Dec 2017 22:57:26 -0500
|
|
Subject: [PATCH] ExperienceOrbMergeEvent
|
|
|
|
Fired when the server is about to merge 2 experience orbs
|
|
Plugins can cancel this if they want to ensure experience orbs do not lose important
|
|
metadata such as spawn reason, or conditionally move data from source to target.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
|
index e4502551..9f5388ed 100644
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
@@ -1153,7 +1153,7 @@ public abstract class World implements IBlockAccess {
|
|
for (Entity e : entities) {
|
|
if (e instanceof EntityExperienceOrb) {
|
|
EntityExperienceOrb loopItem = (EntityExperienceOrb) e;
|
|
- if (!loopItem.dead && !(maxValue > 0 && loopItem.value >= maxValue)) { // Paper
|
|
+ if (!loopItem.dead && !(maxValue > 0 && loopItem.value >= maxValue) && new com.destroystokyo.paper.event.entity.ExperienceOrbMergeEvent((org.bukkit.entity.ExperienceOrb) entity.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) loopItem.getBukkitEntity()).callEvent()) { // Paper
|
|
xp.value += loopItem.value;
|
|
// Paper start
|
|
if (!mergeUnconditionally && xp.value > maxValue) {
|
|
--
|
|
2.14.3
|
|
|