aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/api/EntryRegistry.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/shedaniel/rei/api/EntryRegistry.java')
-rw-r--r--src/main/java/me/shedaniel/rei/api/EntryRegistry.java68
1 files changed, 6 insertions, 62 deletions
diff --git a/src/main/java/me/shedaniel/rei/api/EntryRegistry.java b/src/main/java/me/shedaniel/rei/api/EntryRegistry.java
index 9a811a127..338986578 100644
--- a/src/main/java/me/shedaniel/rei/api/EntryRegistry.java
+++ b/src/main/java/me/shedaniel/rei/api/EntryRegistry.java
@@ -5,28 +5,15 @@
package me.shedaniel.rei.api;
-import me.shedaniel.rei.api.annotations.ToBeRemoved;
import me.shedaniel.rei.utils.CollectionUtils;
-import net.minecraft.fluid.Fluid;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
-import java.util.Collections;
import java.util.List;
public interface EntryRegistry {
/**
- * Gets the current unmodifiable item list
- *
- * @return an unmodifiable item list
- */
- @Deprecated
- default List<Entry> getEntryList() {
- return Collections.unmodifiableList(getModifiableEntryList());
- }
-
- /**
* Gets the current modifiable stacks list
*
* @return a stacks list
@@ -34,16 +21,6 @@ public interface EntryRegistry {
List<EntryStack> getStacksList();
/**
- * Gets the current modifiable item list
- *
- * @return an modifiable item list
- */
- @Deprecated
- default List<Entry> getModifiableEntryList() {
- return CollectionUtils.map(getStacksList(), EntryStack::toEntry);
- }
-
- /**
* Gets all possible stacks from an item
*
* @param item the item to find
@@ -51,39 +28,18 @@ public interface EntryRegistry {
*/
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
- */
- @Deprecated
- default void registerItemStack(Item afterItem, ItemStack stack) {
- registerEntryAfter(EntryStack.create(afterItem), EntryStack.create(stack));
- }
-
- @Deprecated
- default void registerFluid(Fluid fluid) {
- registerEntry(EntryStack.create(fluid));
- }
-
default void registerEntry(EntryStack stack) {
registerEntryAfter(null, stack);
}
+ /**
+ * Registers an new stack to the entry list
+ *
+ * @param afterEntry the stack to put after
+ * @param stack the stack to register
+ */
void registerEntryAfter(EntryStack afterEntry, EntryStack stack);
- @ToBeRemoved
- @Deprecated
- default void registerItemStack(Item afterItem, ItemStack... stacks) {
- EntryStack afterStack = EntryStack.create(afterItem);
- for (int i = stacks.length - 1; i >= 0; i--) {
- ItemStack stack = stacks[i];
- if (stack != null && !stack.isEmpty())
- registerEntryAfter(afterStack, EntryStack.create(stack));
- }
- }
-
/**
* Registers multiple stacks to the item list
*
@@ -98,12 +54,6 @@ public interface EntryRegistry {
}
}
- @ToBeRemoved
- @Deprecated
- default void registerItemStack(ItemStack... stacks) {
- registerItemStack(null, stacks);
- }
-
/**
* Registers multiple stacks to the item list
*
@@ -113,12 +63,6 @@ public interface EntryRegistry {
registerEntriesAfter(null, stacks);
}
- @ToBeRemoved
- @Deprecated
- default boolean alreadyContain(ItemStack stack) {
- return alreadyContain(EntryStack.create(stack));
- }
-
/**
* Checks if a stack is already registered
*