From ea634e7ba29146d4ebc2c05b61257fa6c3b0642e Mon Sep 17 00:00:00 2001 From: shedaniel Date: Fri, 5 Feb 2021 10:08:44 +0800 Subject: More relocation Signed-off-by: shedaniel --- .../java/me/shedaniel/rei/impl/ClientHelperImpl.java | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'runtime/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java') diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java index 4cf2659e9..5d3b91900 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java @@ -29,8 +29,10 @@ import me.shedaniel.architectury.utils.Fraction; import me.shedaniel.rei.RoughlyEnoughItemsCore; import me.shedaniel.rei.RoughlyEnoughItemsNetwork; import me.shedaniel.rei.api.*; -import me.shedaniel.rei.api.entry.EntryStacks; -import me.shedaniel.rei.api.entry.VanillaEntryTypes; +import me.shedaniel.rei.api.ingredient.EntryStack; +import me.shedaniel.rei.api.ingredient.util.EntryStacks; +import me.shedaniel.rei.api.ingredient.entry.VanillaEntryTypes; +import me.shedaniel.rei.api.registry.category.DisplayCategory; import me.shedaniel.rei.gui.PreRecipeViewingScreen; import me.shedaniel.rei.gui.RecipeScreen; import me.shedaniel.rei.gui.RecipeViewingScreen; @@ -187,13 +189,13 @@ public class ClientHelperImpl implements ClientHelper, ClientModInitializer { } @ApiStatus.Internal - public void openRecipeViewingScreen(Map, List> map, @Nullable ResourceLocation category, @Nullable EntryStack ingredientNotice, @Nullable EntryStack resultNotice) { + public void openRecipeViewingScreen(Map, List> map, @Nullable ResourceLocation category, @Nullable EntryStack ingredientNotice, @Nullable EntryStack resultNotice) { openView(new LegacyWrapperViewSearchBuilder(map).setPreferredOpenedCategory(category).setInputNotice(ingredientNotice).setOutputNotice(resultNotice).fillPreferredOpenedCategory()); } @Override public boolean openView(ClientHelper.ViewSearchBuilder builder) { - Map, List> map = builder.buildMap(); + Map, List> map = builder.buildMap(); if (map.isEmpty()) return false; Screen screen; if (ConfigObject.getInstance().getRecipeScreenType() == RecipeScreenType.VILLAGER) { @@ -255,7 +257,7 @@ public class ClientHelperImpl implements ClientHelper, ClientModInitializer { @Nullable private EntryStack inputNotice; @Nullable private EntryStack outputNotice; @NotNull - private final LazyLoadedValue, List>> map = new LazyLoadedValue<>(() -> RecipeHelper.getInstance().buildMapFor(this)); + private final LazyLoadedValue, List>> map = new LazyLoadedValue<>(() -> RecipeRegistry.getInstance().buildMapFor(this)); @Override public ClientHelper.ViewSearchBuilder addCategory(ResourceLocation category) { @@ -337,18 +339,18 @@ public class ClientHelperImpl implements ClientHelper, ClientModInitializer { @NotNull @Override - public Map, List> buildMap() { + public Map, List> buildMap() { return this.map.get(); } } public static final class LegacyWrapperViewSearchBuilder extends AbstractViewSearchBuilder { - @NotNull private final Map, List> map; + @NotNull private final Map, List> map; @Nullable private ResourceLocation preferredOpenedCategory = null; @Nullable private EntryStack inputNotice; @Nullable private EntryStack outputNotice; - public LegacyWrapperViewSearchBuilder(@NotNull Map, List> map) { + public LegacyWrapperViewSearchBuilder(@NotNull Map, List> map) { this.map = map; } @@ -424,7 +426,7 @@ public class ClientHelperImpl implements ClientHelper, ClientModInitializer { } @Override - public @NotNull Map, List> buildMap() { + public @NotNull Map, List> buildMap() { return this.map; } } -- cgit