diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-01-22 18:53:01 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-01-22 18:53:01 +0800 |
| commit | 752ce451bad972d7cf241eedcf1cb7d14fa0245b (patch) | |
| tree | 35a0fe3fbdf9719ee7e02146452e60ba9e9bc4ae /src/main/java | |
| parent | fa843ff9f67048e4e30e8000f64b330373066e10 (diff) | |
| download | RoughlyEnoughItems-752ce451bad972d7cf241eedcf1cb7d14fa0245b.tar.gz RoughlyEnoughItems-752ce451bad972d7cf241eedcf1cb7d14fa0245b.tar.bz2 RoughlyEnoughItems-752ce451bad972d7cf241eedcf1cb7d14fa0245b.zip | |
v2.1.0.43
Close #12
Adds warn message if player didn't install plugin loader.
Diffstat (limited to 'src/main/java')
3 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java b/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java index 3770a8d9f..6abfb8972 100644 --- a/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java +++ b/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java @@ -55,6 +55,7 @@ public class RoughlyEnoughItemsCore implements ClientModInitializer, ModInitiali public static IRecipePlugin registerPlugin(Identifier identifier, IRecipePlugin plugin) { plugins.put(identifier, plugin); + RoughlyEnoughItemsCore.LOGGER.info("REI: Registered plugin %s from %s", identifier.toString(), plugin.getClass()); return plugin; } @@ -73,8 +74,10 @@ public class RoughlyEnoughItemsCore implements ClientModInitializer, ModInitiali public void onInitializeClient() { registerREIListeners(); // If pluginloader is not installed, base functionality should still remain - if (!Loader.getInstance().isModLoaded("pluginloader")) + if (!Loader.getInstance().isModLoaded("pluginloader")) { + RoughlyEnoughItemsCore.LOGGER.warn("REI: Plugin Loader is not loaded! Please consider installing https://minecraft.curseforge.com/projects/pluginloader for REI plugin compatibility!"); registerPlugin(new Identifier("roughlyenoughitems", "default_plugin"), new DefaultPlugin()); + } configHelper = new ConfigHelper(); } diff --git a/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsPlugins.java b/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsPlugins.java index d3ff98686..80e1bafd9 100644 --- a/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsPlugins.java +++ b/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsPlugins.java @@ -21,9 +21,8 @@ public class RoughlyEnoughItemsPlugins implements LoaderCreator { try { IRecipePlugin plugin = (IRecipePlugin) container.getOwner().getAdapter().createInstance(aClass, instantiationOptions); RoughlyEnoughItemsCore.registerPlugin(id, plugin); - RoughlyEnoughItemsCore.LOGGER.info("Registered plugin %s from %s", id, aClass); } catch (LanguageAdapterException e) { - RoughlyEnoughItemsCore.LOGGER.error("Error loading plugin %s", id, e); + RoughlyEnoughItemsCore.LOGGER.error("REI: Error loading plugin %s", id, e); } }) .build(); diff --git a/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java index 9e1509880..4640a14e8 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java @@ -67,7 +67,7 @@ public class RecipeViewingWidget extends Gui { @Override public boolean keyPressed(int int_1, int int_2, int int_3) { - if (int_1 == 256 && this.doesEscapeKeyClose()) { + if ((int_1 == 256 || this.client.options.keyInventory.matchesKey(int_1, int_2)) && this.doesEscapeKeyClose()) { MinecraftClient.getInstance().openGui(parent.getContainerGui()); return true; } |
