diff options
| author | shedaniel <daniel@shedaniel.me> | 2022-01-16 02:46:37 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2022-01-16 02:46:37 +0800 |
| commit | 522caf33b220a20ed485e8a6efded97fe2f1909b (patch) | |
| tree | 06b7234a2ff635170ec1eb8d43f04eca08f42c9d /runtime/src/main/java | |
| parent | fe5e8657ae2e03923af9209d15e4fff3d1230f11 (diff) | |
| download | RoughlyEnoughItems-522caf33b220a20ed485e8a6efded97fe2f1909b.tar.gz RoughlyEnoughItems-522caf33b220a20ed485e8a6efded97fe2f1909b.tar.bz2 RoughlyEnoughItems-522caf33b220a20ed485e8a6efded97fe2f1909b.zip | |
Fix #672
Diffstat (limited to 'runtime/src/main/java')
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java index 04a98afb3..bacfe9409 100644 --- a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java +++ b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java @@ -280,7 +280,9 @@ public class RoughlyEnoughItemsCoreClient { }); GuiEvent.INIT_POST.register((screen, widgets, children) -> { REIRuntime.getInstance().getOverlay(false, true); - REIRuntimeImpl.getInstance().setPreviousScreen(screen); + if (Minecraft.getInstance().screen == screen) { + REIRuntimeImpl.getInstance().setPreviousScreen(screen); + } if (ConfigObject.getInstance().doesDisableRecipeBook() && screen instanceof AbstractContainerScreen) { widgets.removeIf(widget -> widget instanceof ImageButton && ((ImageButton) widget).resourceLocation.equals(recipeButtonTex)); screen.children().removeIf(widget -> widget instanceof ImageButton && ((ImageButton) widget).resourceLocation.equals(recipeButtonTex)); |
