papermc/Spigot-API-Patches/0058-Entity-fromMobSpawner.patch
2018-07-23 09:44:57 +01:00

26 lines
856 B
Diff

From d12b4647862ab81272f1030da1a9fbeb2e7d30b1 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 18 Jun 2017 18:17:05 -0500
Subject: [PATCH] Entity#fromMobSpawner()
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 9b0f97f1..3ae4de7a 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -507,5 +507,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable {
* @return Location where entity originates or null if not yet added
*/
Location getOrigin();
+
+ /**
+ * Returns whether this entity was spawned from a mob spawner.
+ *
+ * @return True if entity spawned from a mob spawner
+ */
+ boolean fromMobSpawner();
// Paper end
}
--
2.18.0