Paper/patches/server/0071-Entity-AddTo-RemoveFrom-World-Events.patch
Jake Potrebic 55d5c1650f
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6149)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
17c35d6e SPIGOT-6637: Revert "#636: Add FurnaceStartSmeltEvent"
4b27230b SPIGOT-6623: Missing API reasons for entity freezing
e1528c85 #636: Add FurnaceStartSmeltEvent

CraftBukkit Changes:
a6292cc3 SPIGOT-6637: Revert "#874: Add FurnaceStartSmeltEvent"
f4066854 SPIGOT-6579: DragonFireBall movement with setDirection jumps around a lot
9add952b SPIGOT-6623: Missing API reasons for entity freezing
2ea359f1 #874: Add FurnaceStartSmeltEvent
be8d625e SPIGOT-5560, SPIGOT-6574, SPIGOT-6632: Remove no longer needed tile entity fix

Spigot Changes:
eac3cd96 Rebuild patches
2021-07-11 09:01:29 +02:00

27 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:32:58 -0400
Subject: [PATCH] Entity AddTo/RemoveFrom World Events
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index ba964bc8b2d86b86be2d527fdc8d8aa342ac0e5e..4291492dc5cf0c845af30f62e2dcb15826842d12 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1865,6 +1865,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
}
// Paper end
+ new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid
}
public void onTrackingEnd(Entity entity) {
@@ -1929,6 +1930,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
entity.valid = false; // CraftBukkit
+ new com.destroystokyo.paper.event.entity.EntityRemoveFromWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid
}
}
}