diff options
| -rw-r--r-- | gradle.properties | 14 | ||||
| -rw-r--r-- | src/main/java/me/shedaniel/rei/plugin/smithing/DefaultSmithingDisplay.java | 15 |
2 files changed, 20 insertions, 9 deletions
diff --git a/gradle.properties b/gradle.properties index 6397d29f6..a884e2d60 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,13 +1,13 @@ org.gradle.jvmargs=-Xmx3G mod_version=4.5.2 -supported_version=1.16-pre3 -minecraft_version=1.16-pre3 -yarn_version=1.16-pre3+build.1+legacy.20w09a+build.8 -fabricloader_version=0.8.7+build.201 +supported_version=1.16 +minecraft_version=1.16-rc1 +yarn_version=1.16-rc1+build.4+legacy.20w09a+build.8 +fabricloader_version=0.8.8+build.202 cloth_client_events_v0_version=1.0.2 -cloth_config_version=4.5.3 -modmenu_version=1.12.0+build.14 -fabric_api=0.11.8+build.357-1.16 +cloth_config_version=4.5.5 +modmenu_version=1.12.1+build.15 +fabric_api=0.12.5+build.367-1.16 autoconfig1u=3.2.0-unstable api_include=me.shedaniel.cloth.api:cloth-client-events-v0,me.shedaniel.cloth:config-2,me.sargunvohra.mcmods:autoconfig1u,net.fabricmc.fabric-api:fabric-api-base api_exculde= 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 0fff256f6..e22719e8d 100644 --- a/src/main/java/me/shedaniel/rei/plugin/smithing/DefaultSmithingDisplay.java +++ b/src/main/java/me/shedaniel/rei/plugin/smithing/DefaultSmithingDisplay.java @@ -8,15 +8,19 @@ import me.shedaniel.rei.utils.CollectionUtils; import net.minecraft.recipe.SmithingRecipe; import net.minecraft.util.Identifier; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.Collections; import java.util.List; +import java.util.Optional; public class DefaultSmithingDisplay implements RecipeDisplay { @NotNull private List<List<EntryStack>> input; @NotNull private List<EntryStack> output; + @Nullable + private Identifier location; public DefaultSmithingDisplay(@NotNull SmithingRecipe recipe) { this( @@ -24,14 +28,16 @@ public class DefaultSmithingDisplay implements RecipeDisplay { CollectionUtils.map(recipe.base.getMatchingStacksClient(), EntryStack::create), CollectionUtils.map(recipe.addition.getMatchingStacksClient(), EntryStack::create) ), - Collections.singletonList(EntryStack.create(recipe.getOutput())) + Collections.singletonList(EntryStack.create(recipe.getOutput())), + recipe.getId() ); } - public DefaultSmithingDisplay(@NotNull List<List<EntryStack>> input, @NotNull List<EntryStack> output) { + public DefaultSmithingDisplay(@NotNull List<List<EntryStack>> input, @NotNull List<EntryStack> output, @Nullable Identifier location) { this.input = input; this.output = output; if (this.input.size() != 2) throw new IllegalArgumentException("input must have 2 entries."); + this.location = location; } @Override @@ -48,4 +54,9 @@ public class DefaultSmithingDisplay implements RecipeDisplay { public Identifier getRecipeCategory() { return DefaultPlugin.SMITHING; } + + @Override + public Optional<Identifier> getRecipeLocation() { + return Optional.ofNullable(location); + } } |
