aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/api/ItemRegistry.java
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-08-09 20:47:52 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-08-09 20:47:52 +0800
commit019aa13875ca639dda2f34c66e3160f72b923cfd (patch)
tree71ba416e597b6eefe561209357f0c95252c3f4f5 /src/main/java/me/shedaniel/rei/api/ItemRegistry.java
parentdd680c2cd41f11eccd294ca30c38b82565cd1633 (diff)
downloadRoughlyEnoughItems-019aa13875ca639dda2f34c66e3160f72b923cfd.tar.gz
RoughlyEnoughItems-019aa13875ca639dda2f34c66e3160f72b923cfd.tar.bz2
RoughlyEnoughItems-019aa13875ca639dda2f34c66e3160f72b923cfd.zip
Fluid?
Diffstat (limited to 'src/main/java/me/shedaniel/rei/api/ItemRegistry.java')
-rw-r--r--src/main/java/me/shedaniel/rei/api/ItemRegistry.java79
1 files changed, 0 insertions, 79 deletions
diff --git a/src/main/java/me/shedaniel/rei/api/ItemRegistry.java b/src/main/java/me/shedaniel/rei/api/ItemRegistry.java
deleted file mode 100644
index 5c55ae3ac..000000000
--- a/src/main/java/me/shedaniel/rei/api/ItemRegistry.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Roughly Enough Items by Danielshe.
- * Licensed under the MIT License.
- */
-
-package me.shedaniel.rei.api;
-
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
-import java.util.List;
-
-public interface ItemRegistry {
-
- /**
- * Gets the current unmodifiable item list
- *
- * @return an unmodifiable item list
- */
- List<ItemStack> getItemList();
-
- /**
- * Gets the current modifiable item list
- *
- * @return an modifiable item list
- */
- @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);
-
- /**
- * Registers an new stack to the item list
- *
- * @param afterItem the stack to put after
- * @param stack the stack to register
- */
- 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 (int i = stacks.length - 1; i >= 0; i--) {
- ItemStack stack = stacks[i];
- 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) {
- registerItemStack(null, stacks);
- }
-
- /**
- * Checks if a stack is already registered
- *
- * @param stack the stack to check
- * @return whether the stack has been registered
- */
- default boolean alreadyContain(ItemStack stack) {
- return getItemList().stream().anyMatch(stack1 -> ItemStack.areEqualIgnoreDamage(stack, stack1));
- }
-
-}