2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
|
|
Date: Fri, 19 Apr 2019 12:41:19 -0500
|
|
|
|
Subject: [PATCH] Mob Spawner API Enhancements
|
|
|
|
|
|
|
|
|
2024-07-06 21:19:14 +02:00
|
|
|
diff --git a/src/main/java/org/bukkit/spawner/Spawner.java b/src/main/java/org/bukkit/spawner/Spawner.java
|
2021-06-11 14:02:28 +02:00
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
2024-07-06 21:19:14 +02:00
|
|
|
--- a/src/main/java/org/bukkit/spawner/Spawner.java
|
|
|
|
+++ b/src/main/java/org/bukkit/spawner/Spawner.java
|
|
|
|
@@ -0,0 +0,0 @@ public interface Spawner extends BaseSpawner {
|
|
|
|
* @param maxNearbyEntities the maximum number of nearby, similar, entities
|
2021-06-11 14:02:28 +02:00
|
|
|
*/
|
2024-07-06 21:19:14 +02:00
|
|
|
public void setMaxNearbyEntities(int maxNearbyEntities);
|
2021-06-11 14:02:28 +02:00
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ /**
|
|
|
|
+ * Check if spawner is activated (a player is close enough)
|
|
|
|
+ *
|
|
|
|
+ * @return True if a player is close enough to activate it
|
|
|
|
+ */
|
|
|
|
+ public boolean isActivated();
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Resets the spawn delay timer within the min/max range
|
|
|
|
+ */
|
|
|
|
+ public void resetTimer();
|
|
|
|
+
|
|
|
|
+ /**
|
2024-04-24 01:30:24 +02:00
|
|
|
+ * Sets the {@link EntityType} to {@link EntityType#ITEM} and sets the data to the given
|
2021-06-11 14:02:28 +02:00
|
|
|
+ * {@link org.bukkit.inventory.ItemStack ItemStack}.
|
|
|
|
+ * <p>
|
|
|
|
+ * {@link #setSpawnCount(int)} does not dictate the amount of items in the stack spawned, but rather how many
|
|
|
|
+ * stacks should be spawned.
|
|
|
|
+ *
|
|
|
|
+ * @param itemStack The item to spawn. Must not {@link org.bukkit.Material#isAir be air}.
|
|
|
|
+ * @see #setSpawnedType(EntityType)
|
|
|
|
+ */
|
2023-06-13 01:51:45 +02:00
|
|
|
+ void setSpawnedItem(org.bukkit.inventory.@org.jetbrains.annotations.NotNull ItemStack itemStack);
|
2021-06-11 14:02:28 +02:00
|
|
|
+ // Paper end
|
|
|
|
}
|