aboutsummaryrefslogtreecommitdiff
path: root/runtime/src
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2022-01-16 02:46:37 +0800
committershedaniel <daniel@shedaniel.me>2022-01-16 03:01:32 +0800
commitcd14b351c2c1779f92c428b105e9f32eea993e2c (patch)
tree21b9732ceba10de40a751d21da7639abafe89137 /runtime/src
parent5122d2ba64e67decc414f47b455dadbd273da268 (diff)
downloadRoughlyEnoughItems-cd14b351c2c1779f92c428b105e9f32eea993e2c.tar.gz
RoughlyEnoughItems-cd14b351c2c1779f92c428b105e9f32eea993e2c.tar.bz2
RoughlyEnoughItems-cd14b351c2c1779f92c428b105e9f32eea993e2c.zip
Fix #672
Diffstat (limited to 'runtime/src')
-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 35add837a..e35f0e3c2 100644
--- a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java
+++ b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java
@@ -281,7 +281,9 @@ public class RoughlyEnoughItemsCoreClient {
});
ClientGuiEvent.INIT_POST.register((screen, access) -> {
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) {
access.getRenderables().removeIf(widget -> widget instanceof ImageButton button && button.resourceLocation.equals(recipeButtonTex));
access.getNarratables().removeIf(widget -> widget instanceof ImageButton button && button.resourceLocation.equals(recipeButtonTex));