diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-07-14 11:19:19 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-07-14 11:19:29 +0800 |
| commit | e2c264a82dc10b8e29b08225cd5bc24e689fa332 (patch) | |
| tree | 4adf065ef2183d7cb22b684806543121f9fb4359 /src/main/java/me/shedaniel/rei/plugin/smithing/DefaultSmithingDisplay.java | |
| parent | 1a6a10596fd0d9cc7e35419ced6fe056d93d7604 (diff) | |
| download | RoughlyEnoughItems-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/smithing/DefaultSmithingDisplay.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/plugin/smithing/DefaultSmithingDisplay.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main/java/me/shedaniel/rei/plugin/smithing/DefaultSmithingDisplay.java b/src/main/java/me/shedaniel/rei/plugin/smithing/DefaultSmithingDisplay.java index 05b5bbc87..97ea39ed7 100644 --- a/src/main/java/me/shedaniel/rei/plugin/smithing/DefaultSmithingDisplay.java +++ b/src/main/java/me/shedaniel/rei/plugin/smithing/DefaultSmithingDisplay.java @@ -27,7 +27,8 @@ import com.google.common.collect.Lists; import me.shedaniel.rei.api.EntryStack; import me.shedaniel.rei.api.RecipeDisplay; import me.shedaniel.rei.plugin.DefaultPlugin; -import me.shedaniel.rei.utils.CollectionUtils; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; import net.minecraft.recipe.SmithingRecipe; import net.minecraft.util.Identifier; import org.jetbrains.annotations.NotNull; @@ -37,6 +38,7 @@ import java.util.Collections; import java.util.List; import java.util.Optional; +@Environment(EnvType.CLIENT) public class DefaultSmithingDisplay implements RecipeDisplay { @NotNull private List<List<EntryStack>> input; @@ -48,8 +50,8 @@ public class DefaultSmithingDisplay implements RecipeDisplay { public DefaultSmithingDisplay(@NotNull SmithingRecipe recipe) { this( Lists.newArrayList( - EntryStack.create(recipe.base), - EntryStack.create(recipe.addition) + EntryStack.ofIngredient(recipe.base), + EntryStack.ofIngredient(recipe.addition) ), Collections.singletonList(EntryStack.create(recipe.getOutput())), recipe.getId() @@ -74,6 +76,11 @@ public class DefaultSmithingDisplay implements RecipeDisplay { } @Override + public List<List<EntryStack>> getRequiredEntries() { + return getInputEntries(); + } + + @Override public Identifier getRecipeCategory() { return DefaultPlugin.SMITHING; } |
