From a56baa875630ffac06e421a7389854b5301ed7f0 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Sun, 21 Feb 2021 22:33:45 +0800 Subject: More Signed-off-by: shedaniel --- .../main/java/me/shedaniel/rei/impl/Internals.java | 33 +++++++++------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'api/src/main/java/me/shedaniel/rei/impl/Internals.java') diff --git a/api/src/main/java/me/shedaniel/rei/impl/Internals.java b/api/src/main/java/me/shedaniel/rei/impl/Internals.java index de4157153..1157267bb 100644 --- a/api/src/main/java/me/shedaniel/rei/impl/Internals.java +++ b/api/src/main/java/me/shedaniel/rei/impl/Internals.java @@ -39,6 +39,9 @@ import me.shedaniel.rei.api.ingredient.entry.EntryDefinition; import me.shedaniel.rei.api.ingredient.entry.EntryType; import me.shedaniel.rei.api.ingredient.entry.EntryTypeRegistry; import me.shedaniel.rei.api.plugins.BuiltinPlugin; +import me.shedaniel.rei.api.registry.CategoryRegistry; +import me.shedaniel.rei.api.registry.EntryRegistry; +import me.shedaniel.rei.api.registry.screens.ScreenRegistry; import me.shedaniel.rei.api.subsets.SubsetsRegistry; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -60,14 +63,15 @@ import java.util.function.Supplier; public final class Internals { private static Supplier configManager = Internals::throwNotSetup; private static Supplier clientHelper = Internals::throwNotSetup; - private static Supplier recipeHelper = Internals::throwNotSetup; + private static Supplier displayRegistry = Internals::throwNotSetup; private static Supplier reiHelper = Internals::throwNotSetup; private static Supplier fluidSupportProvider = Internals::throwNotSetup; private static Supplier entryStackProvider = Internals::throwNotSetup; private static Supplier entryIngredientProvider = Internals::throwNotSetup; private static Supplier subsetsRegistry = Internals::throwNotSetup; private static Supplier entryRegistry = Internals::throwNotSetup; - private static Supplier displayHelper = Internals::throwNotSetup; + private static Supplier categoryRegistry = Internals::throwNotSetup; + private static Supplier displayHelper = Internals::throwNotSetup; private static Supplier widgetsProvider = Internals::throwNotSetup; private static Supplier viewSearchBuilder = Internals::throwNotSetup; private static Supplier favoriteEntryTypeRegistry = Internals::throwNotSetup; @@ -83,63 +87,55 @@ public final class Internals { throw new AssertionError("REI Internals have not been initialized!"); } - @NotNull public static ConfigManager getConfigManager() { return configManager.get(); } - @NotNull public static ClientHelper getClientHelper() { return clientHelper.get(); } - @NotNull - public static RecipeRegistry getRecipeHelper() { - return recipeHelper.get(); + public static DisplayRegistry getDisplayRegistry() { + return displayRegistry.get(); } - @NotNull public static REIHelper getREIHelper() { return reiHelper.get(); } - @NotNull @ApiStatus.Experimental public static FluidSupportProvider getFluidSupportProvider() { return fluidSupportProvider.get(); } - @NotNull public static EntryStackProvider getEntryStackProvider() { return entryStackProvider.get(); } - @NotNull public static EntryIngredientProvider getEntryIngredientProvider() { return entryIngredientProvider.get(); } - @NotNull public static SubsetsRegistry getSubsetsRegistry() { return subsetsRegistry.get(); } - @NotNull public static EntryRegistry getEntryRegistry() { return entryRegistry.get(); } - @NotNull - public static DisplayBoundsRegistry getDisplayHelper() { + public static CategoryRegistry getCategoryRegistry() { + return categoryRegistry.get(); + } + + public static ScreenRegistry getDisplayHelper() { return displayHelper.get(); } - @NotNull public static WidgetsProvider getWidgetsProvider() { return widgetsProvider.get(); } - @NotNull public static ClientHelper.ViewSearchBuilder createViewSearchBuilder() { return viewSearchBuilder.get(); } @@ -148,17 +144,14 @@ public final class Internals { return favoriteEntryTypeRegistry.get(); } - @NotNull public static ClickAreaHandler.Result createClickAreaHandlerResult(boolean applicable) { return clickAreaHandlerResult.apply(applicable); } - @NotNull public static Tooltip createTooltip(@Nullable Point point, Collection texts) { return tooltipProvider.apply(point, texts); } - @NotNull public static BuiltinPlugin getBuiltinPlugin() { return builtinPlugin.get(); } -- cgit