Support spawning item stacks
This commit is contained in:
parent
d7d74c552e
commit
b63c890ec2
2 changed files with 45 additions and 4 deletions
|
@ -5,10 +5,10 @@ Subject: [PATCH] Mob Spawner API Enhancements
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/CreatureSpawner.java b/src/main/java/org/bukkit/block/CreatureSpawner.java
|
||||
index cb447a4ad5a9dce7c98999a5d7fcd6111fc9b10e..35a599ebe9a35dc9570d546d73622da87cb136c4 100644
|
||||
index cb447a4ad5a9dce7c98999a5d7fcd6111fc9b10e..5bbae759ce39d42886994e500fd9454ec328f804 100644
|
||||
--- a/src/main/java/org/bukkit/block/CreatureSpawner.java
|
||||
+++ b/src/main/java/org/bukkit/block/CreatureSpawner.java
|
||||
@@ -199,4 +199,18 @@ public interface CreatureSpawner extends TileState {
|
||||
@@ -199,4 +199,30 @@ public interface CreatureSpawner extends TileState {
|
||||
* @see #getSpawnRange()
|
||||
*/
|
||||
public void setSpawnRange(int spawnRange);
|
||||
|
@ -25,5 +25,17 @@ index cb447a4ad5a9dce7c98999a5d7fcd6111fc9b10e..35a599ebe9a35dc9570d546d73622da8
|
|||
+ * Resets the spawn delay timer within the min/max range
|
||||
+ */
|
||||
+ public void resetTimer();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the {@link EntityType} to {@link EntityType#DROPPED_ITEM} and sets the data to the given
|
||||
+ * {@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)
|
||||
+ */
|
||||
+ void setSpawnedItem(@NotNull org.bukkit.inventory.ItemStack itemStack);
|
||||
+ // Paper end
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue