aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/api/ItemRegistry.java
diff options
context:
space:
mode:
authorDaniel She <shekwancheung0528@gmail.com>2019-05-12 18:10:21 +0800
committerDaniel She <shekwancheung0528@gmail.com>2019-05-12 18:10:21 +0800
commitd979cb8b465c73eabca4e32be2ffa26648471fee (patch)
tree8aac9df58b40052b6b19c0c3ac7da66076dc5b1c /src/main/java/me/shedaniel/rei/api/ItemRegistry.java
parent54f120195a63dbc145b74485e410abcd4c5acdf4 (diff)
parenta98d9191f1a97925a8a3e2e23c0a07867540a93a (diff)
downloadRoughlyEnoughItems-d979cb8b465c73eabca4e32be2ffa26648471fee.tar.gz
RoughlyEnoughItems-d979cb8b465c73eabca4e32be2ffa26648471fee.tar.bz2
RoughlyEnoughItems-d979cb8b465c73eabca4e32be2ffa26648471fee.zip
Merge branch '1.14-dev' into 1.14
Diffstat (limited to 'src/main/java/me/shedaniel/rei/api/ItemRegistry.java')
-rw-r--r--src/main/java/me/shedaniel/rei/api/ItemRegistry.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/me/shedaniel/rei/api/ItemRegistry.java b/src/main/java/me/shedaniel/rei/api/ItemRegistry.java
index 0a9da2c46..a29682985 100644
--- a/src/main/java/me/shedaniel/rei/api/ItemRegistry.java
+++ b/src/main/java/me/shedaniel/rei/api/ItemRegistry.java
@@ -27,6 +27,12 @@ public interface ItemRegistry {
@Deprecated
List<ItemStack> getModifiableItemList();
+ /**
+ * Gets all possible stacks from an item
+ *
+ * @param item the item to find
+ * @return the array of possible stacks
+ */
ItemStack[] getAllStacksFromItem(Item item);
/**
@@ -37,12 +43,23 @@ public interface ItemRegistry {
*/
void registerItemStack(Item afterItem, ItemStack stack);
+ /**
+ * Registers multiple stacks to the item list
+ *
+ * @param afterItem the stack to put after
+ * @param stacks the stacks to register
+ */
default void registerItemStack(Item afterItem, ItemStack... stacks) {
for(ItemStack stack : stacks)
if (stack != null && !stack.isEmpty())
registerItemStack(afterItem, stack);
}
+ /**
+ * Registers multiple stacks to the item list
+ *
+ * @param stacks the stacks to register
+ */
default void registerItemStack(ItemStack... stacks) {
for(ItemStack stack : stacks)
if (stack != null && !stack.isEmpty())