aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/plugin/crafting/DefaultShapelessDisplay.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-07-14 11:19:19 +0800
committershedaniel <daniel@shedaniel.me>2020-07-14 11:19:29 +0800
commite2c264a82dc10b8e29b08225cd5bc24e689fa332 (patch)
tree4adf065ef2183d7cb22b684806543121f9fb4359 /src/main/java/me/shedaniel/rei/plugin/crafting/DefaultShapelessDisplay.java
parent1a6a10596fd0d9cc7e35419ced6fe056d93d7604 (diff)
downloadRoughlyEnoughItems-e2c264a82dc10b8e29b08225cd5bc24e689fa332.tar.gz
RoughlyEnoughItems-e2c264a82dc10b8e29b08225cd5bc24e689fa332.tar.bz2
RoughlyEnoughItems-e2c264a82dc10b8e29b08225cd5bc24e689fa332.zip
Optimised craftable filter and changed some api
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java/me/shedaniel/rei/plugin/crafting/DefaultShapelessDisplay.java')
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/crafting/DefaultShapelessDisplay.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/me/shedaniel/rei/plugin/crafting/DefaultShapelessDisplay.java b/src/main/java/me/shedaniel/rei/plugin/crafting/DefaultShapelessDisplay.java
index eb3c99d85..2277269b3 100644
--- a/src/main/java/me/shedaniel/rei/plugin/crafting/DefaultShapelessDisplay.java
+++ b/src/main/java/me/shedaniel/rei/plugin/crafting/DefaultShapelessDisplay.java
@@ -24,17 +24,17 @@
package me.shedaniel.rei.plugin.crafting;
import me.shedaniel.rei.api.EntryStack;
-import net.minecraft.item.ItemStack;
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
import net.minecraft.recipe.Recipe;
import net.minecraft.recipe.ShapelessRecipe;
import net.minecraft.util.Identifier;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
-import java.util.stream.Collectors;
+@Environment(EnvType.CLIENT)
public class DefaultShapelessDisplay implements DefaultCraftingDisplay {
private ShapelessRecipe display;
@@ -43,7 +43,7 @@ public class DefaultShapelessDisplay implements DefaultCraftingDisplay {
public DefaultShapelessDisplay(ShapelessRecipe recipe) {
this.display = recipe;
- this.input = EntryStack.create(recipe.getPreviewInputs());
+ this.input = EntryStack.ofIngredients(recipe.getPreviewInputs());
this.output = Collections.singletonList(EntryStack.create(recipe.getOutput()));
}