mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
Expand Hopper BlockState API (#10328)
This commit is contained in:
32
patches/api/Expanded-Hopper-API.patch
Normal file
32
patches/api/Expanded-Hopper-API.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: vicisacat <victor.branchu@gmail.com>
|
||||
Date: Fri, 15 Mar 2024 17:35:18 +0100
|
||||
Subject: [PATCH] Expanded Hopper API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/Hopper.java b/src/main/java/org/bukkit/block/Hopper.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/block/Hopper.java
|
||||
+++ b/src/main/java/org/bukkit/block/Hopper.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.loot.Lootable;
|
||||
/**
|
||||
* Represents a captured state of a hopper.
|
||||
*/
|
||||
-public interface Hopper extends Container, LootableBlockInventory { } // Paper
|
||||
+public interface Hopper extends Container, LootableBlockInventory { // Paper
|
||||
+ // Paper start - Expanded Hopper API
|
||||
+ /**
|
||||
+ * Sets the cooldown before the hopper transfers or sucks in another item
|
||||
+ * @param cooldown the cooldown in ticks
|
||||
+ * @throws IllegalArgumentException if the passed cooldown value is negative.
|
||||
+ */
|
||||
+ void setTransferCooldown(@org.jetbrains.annotations.Range(from = 0, to = Integer.MAX_VALUE) int cooldown);
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the cooldown before the hopper transfers or sucks in another item
|
||||
+ * @return the cooldown in ticks
|
||||
+ */
|
||||
+ int getTransferCooldown();
|
||||
+ // Paper end - Expanded Hopper API
|
||||
+}
|
||||
+
|
Reference in New Issue
Block a user