2
0
mirror of https://github.com/PaperMC/Paper.git synced 2024-12-15 07:01:36 +08:00
Paper/Spigot-API-Patches/0181-Mob-Spawner-API-Enhancements.patch
Aikar 36f34f01c0
Updated Upstream (Bukkit/CraftBukkit)
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

Bukkit Changes:
da9ef3c5 : Add methods to get/set ItemStacks in EquipmentSlots
3abebc9f : Let Tameable extend Animals rather than Entity
941111a0 : Expose ItemStack and hand used in PlayerShearEntityEvent
4fe19cae : InventoryView - Add missing Brewing FUEL_TIME

CraftBukkit Changes:
933e9094 : Add methods to get/set ItemStacks in EquipmentSlots
18722312 : Expose ItemStack and hand used in PlayerShearEntityEvent
2020-05-06 06:05:22 -04:00

30 lines
1.0 KiB
Diff

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
diff --git a/src/main/java/org/bukkit/block/CreatureSpawner.java b/src/main/java/org/bukkit/block/CreatureSpawner.java
index cb447a4ad5a9dce7c98999a5d7fcd6111fc9b10e..35a599ebe9a35dc9570d546d73622da87cb136c4 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 {
* @see #getSpawnRange()
*/
public void setSpawnRange(int spawnRange);
+
+ // 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();
+ // Paper end
}