mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-02 17:01:38 +01:00
27 lines
1.3 KiB
Diff
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 bd60bb4a1fa7f3c38c651f72bc58dffcd5736b43..c94fc95adfce7ec4ab3d881f1667f2f54ae38393 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
@@ -2119,6 +2119,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) {
|
|
@@ -2194,6 +2195,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
|
}
|
|
}
|
|
// CraftBukkit end
|
|
+ new com.destroystokyo.paper.event.entity.EntityRemoveFromWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid
|
|
}
|
|
|
|
public void onSectionChange(Entity entity) {
|