瀏覽代碼

Bump to 1.16-rc1

Signed-off-by: shedaniel <daniel@shedaniel.me>
shedaniel 5 年之前
父節點
當前提交
d5eafa51af
共有 2 個文件被更改,包括 20 次插入9 次删除
  1. 7 7
      gradle.properties
  2. 13 2
      src/main/java/me/shedaniel/rei/plugin/smithing/DefaultSmithingDisplay.java

+ 7 - 7
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=

+ 13 - 2
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);
+    }
 }