diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-08-08 00:14:44 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-08-08 00:14:44 +0800 |
| commit | 3a158fb836655cbf44a5a1982222bf50d4e0c42a (patch) | |
| tree | 58f7bfe86b85b41a3e8bec34954303bbcb0f58eb /src/main/java/me/shedaniel/rei/api | |
| parent | dbfcb95826fb5d4ac2e213634d5d154b1feae8de (diff) | |
| download | RoughlyEnoughItems-3a158fb836655cbf44a5a1982222bf50d4e0c42a.tar.gz RoughlyEnoughItems-3a158fb836655cbf44a5a1982222bf50d4e0c42a.tar.bz2 RoughlyEnoughItems-3a158fb836655cbf44a5a1982222bf50d4e0c42a.zip | |
Random Updates
Diffstat (limited to 'src/main/java/me/shedaniel/rei/api')
4 files changed, 14 insertions, 79 deletions
diff --git a/src/main/java/me/shedaniel/rei/api/PluginDisabler.java b/src/main/java/me/shedaniel/rei/api/PluginDisabler.java deleted file mode 100644 index e58a0cfd7..000000000 --- a/src/main/java/me/shedaniel/rei/api/PluginDisabler.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Roughly Enough Items by Danielshe. - * Licensed under the MIT License. - */ - -package me.shedaniel.rei.api; - -import net.minecraft.util.Identifier; - -public interface PluginDisabler { - - /** - * Disables multiple functions from a plugin - * - * @param plugin the identifier of the plugin - * @param functions the array of functions to be disabled - */ - default void disablePluginFunctions(Identifier plugin, PluginFunction... functions) { - for (PluginFunction function : functions) - disablePluginFunction(plugin, function); - } - - /** - * Enables multiple functions from a plugin - * - * @param plugin the identifier of the plugin - * @param functions the array of functions to be enabled - */ - default void enablePluginFunctions(Identifier plugin, PluginFunction... functions) { - for (PluginFunction function : functions) - enablePluginFunction(plugin, function); - } - - /** - * Disables a function from a plugin - * - * @param plugin the identifier of the plugin - * @param function the function to be disabled - */ - void disablePluginFunction(Identifier plugin, PluginFunction function); - - /** - * Enables a function from a plugin - * - * @param plugin the identifier of the plugin - * @param function the function to be enabled - */ - void enablePluginFunction(Identifier plugin, PluginFunction function); - - /** - * Checks if a plugin function has been disabled - * - * @param plugin the identifier of the plugin - * @param function the function to check - * @return whether if it has been disabled - */ - boolean isFunctionEnabled(Identifier plugin, PluginFunction function); - -} diff --git a/src/main/java/me/shedaniel/rei/api/PluginFunction.java b/src/main/java/me/shedaniel/rei/api/PluginFunction.java deleted file mode 100644 index ec20c317a..000000000 --- a/src/main/java/me/shedaniel/rei/api/PluginFunction.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Roughly Enough Items by Danielshe. - * Licensed under the MIT License. - */ - -package me.shedaniel.rei.api; - -public enum PluginFunction { - REGISTER_ITEMS, - REGISTER_CATEGORIES, - REGISTER_RECIPE_DISPLAYS, - REGISTER_BOUNDS, - REGISTER_OTHERS; -} diff --git a/src/main/java/me/shedaniel/rei/api/RecipeHelper.java b/src/main/java/me/shedaniel/rei/api/RecipeHelper.java index f70f21669..9deec1c0e 100644 --- a/src/main/java/me/shedaniel/rei/api/RecipeHelper.java +++ b/src/main/java/me/shedaniel/rei/api/RecipeHelper.java @@ -6,7 +6,6 @@ package me.shedaniel.rei.api; import me.shedaniel.rei.RoughlyEnoughItemsCore; -import me.shedaniel.rei.client.RecipeHelperImpl; import net.minecraft.client.gui.screen.ingame.AbstractContainerScreen; import net.minecraft.item.ItemStack; import net.minecraft.recipe.Recipe; @@ -215,6 +214,14 @@ public interface RecipeHelper { <T extends Recipe<?>> void registerRecipes(Identifier category, Function<Recipe, Boolean> recipeFilter, Function<T, RecipeDisplay> mappingFunction); - List<RecipeHelperImpl.ScreenClickArea> getScreenClickAreas(); + List<RecipeHelper.ScreenClickArea> getScreenClickAreas(); + + interface ScreenClickArea { + Class<? extends AbstractContainerScreen> getScreenClass(); + + Rectangle getRectangle(); + + Identifier[] getCategories(); + } } diff --git a/src/main/java/me/shedaniel/rei/api/plugins/REIPluginV0.java b/src/main/java/me/shedaniel/rei/api/plugins/REIPluginV0.java index 6211e0672..3b71a30f5 100644 --- a/src/main/java/me/shedaniel/rei/api/plugins/REIPluginV0.java +++ b/src/main/java/me/shedaniel/rei/api/plugins/REIPluginV0.java @@ -5,7 +5,10 @@ package me.shedaniel.rei.api.plugins; -import me.shedaniel.rei.api.*; +import me.shedaniel.rei.api.DisplayHelper; +import me.shedaniel.rei.api.ItemRegistry; +import me.shedaniel.rei.api.REIPluginEntry; +import me.shedaniel.rei.api.RecipeHelper; import net.fabricmc.loader.api.SemanticVersion; import net.fabricmc.loader.util.version.VersionParsingException; @@ -15,10 +18,8 @@ public interface REIPluginV0 extends REIPluginEntry { /** * On register of the plugin - * - * @param pluginDisabler the helper class to disable other plugins */ - default void onFirstLoad(PluginDisabler pluginDisabler) { + default void onFirstLoad() { } /** |
