mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-03 13:36:44 +01:00
2f782a6652
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes:17543ecf
SPIGOT-5035: Error Using Virtual Merchant GUI0fc6922b
SPIGOT-5028: Villager#setVillagerExperience() doesn't workbdbdbe44
SPIGOT-5024: Fox error - Unknown target reason
29 lines
1.3 KiB
Diff
29 lines
1.3 KiB
Diff
From fd7dd6801d0da54e55b46da2047e62591dcebc53 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/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
|
index 4568336f11..9f7258ad62 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
@@ -1101,6 +1101,7 @@ public class WorldServer extends World {
|
|
entity.origin = entity.getBukkitEntity().getLocation();
|
|
}
|
|
// Paper end
|
|
+ new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid
|
|
}
|
|
|
|
}
|
|
@@ -1110,6 +1111,7 @@ public class WorldServer extends World {
|
|
if (this.tickingEntities) {
|
|
throw new IllegalStateException("Removing entity while ticking!");
|
|
} else {
|
|
+ new com.destroystokyo.paper.event.entity.EntityRemoveFromWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid
|
|
this.removeEntityFromChunk(entity);
|
|
this.entitiesById.remove(entity.getId());
|
|
this.unregisterEntity(entity);
|
|
--
|
|
2.21.0
|
|
|