aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-01-09 16:44:16 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-01-09 16:44:16 +0800
commit29774e290b17d3f3ce3a8cc2b6b3be8477d85fb8 (patch)
treeda254c8689097a41596a0b82f5bd6b591b89865e /src/main/java/me
parentfca0cd88625d59e05dc1f0c54fac5dcd232ae28e (diff)
downloadRoughlyEnoughItems-29774e290b17d3f3ce3a8cc2b6b3be8477d85fb8.tar.gz
RoughlyEnoughItems-29774e290b17d3f3ce3a8cc2b6b3be8477d85fb8.tar.bz2
RoughlyEnoughItems-29774e290b17d3f3ce3a8cc2b6b3be8477d85fb8.zip
Fix recipes with 'holes' in it
Diffstat (limited to 'src/main/java/me')
-rwxr-xr-xsrc/main/java/me/shedaniel/api/IRecipe.java2
-rwxr-xr-xsrc/main/java/me/shedaniel/impl/REIRecipeManager.java8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/me/shedaniel/api/IRecipe.java b/src/main/java/me/shedaniel/api/IRecipe.java
index a79123ddd..096c6fe1f 100755
--- a/src/main/java/me/shedaniel/api/IRecipe.java
+++ b/src/main/java/me/shedaniel/api/IRecipe.java
@@ -15,6 +15,6 @@ public interface IRecipe<T> {
public List<List<T>> getInput();
- public List<List<T>> getRecipeRequiredInput();
+ public List<List<ItemStack>> getRecipeRequiredInput();
}
diff --git a/src/main/java/me/shedaniel/impl/REIRecipeManager.java b/src/main/java/me/shedaniel/impl/REIRecipeManager.java
index 2f5ed50c6..edccce8ba 100755
--- a/src/main/java/me/shedaniel/impl/REIRecipeManager.java
+++ b/src/main/java/me/shedaniel/impl/REIRecipeManager.java
@@ -10,6 +10,7 @@ import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.Gui;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+import net.minecraft.item.Items;
import net.minecraft.recipe.RecipeManager;
import java.awt.*;
@@ -153,7 +154,12 @@ public class REIRecipeManager implements IRecipeManager {
for(List<IRecipe> value : recipeList.values())
for(IRecipe iRecipe : value) {
int slotsCraftable = 0;
- for(List<ItemStack> slot : ((List<List<ItemStack>>) iRecipe.getRecipeRequiredInput())) {
+ List<List<ItemStack>> requiredInput = (List<List<ItemStack>>) iRecipe.getRecipeRequiredInput();
+ for(List<ItemStack> slot : requiredInput) {
+ if (slot.isEmpty()) {
+ slotsCraftable++;
+ continue;
+ }
boolean slotDone = false;
for(ItemStack possibleType : types) {
for(ItemStack slotPossible : slot)