aboutsummaryrefslogtreecommitdiff
path: root/runtime/src/main/java/me
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2022-01-16 02:46:37 +0800
committershedaniel <daniel@shedaniel.me>2022-01-16 02:46:37 +0800
commit522caf33b220a20ed485e8a6efded97fe2f1909b (patch)
tree06b7234a2ff635170ec1eb8d43f04eca08f42c9d /runtime/src/main/java/me
parentfe5e8657ae2e03923af9209d15e4fff3d1230f11 (diff)
downloadRoughlyEnoughItems-522caf33b220a20ed485e8a6efded97fe2f1909b.tar.gz
RoughlyEnoughItems-522caf33b220a20ed485e8a6efded97fe2f1909b.tar.bz2
RoughlyEnoughItems-522caf33b220a20ed485e8a6efded97fe2f1909b.zip
Fix #672
Diffstat (limited to 'runtime/src/main/java/me')
-rw-r--r--runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java4
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));