aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java')
-rw-r--r--src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java b/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java
index a098eb5c0..ce523c33f 100644
--- a/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java
+++ b/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java
@@ -146,7 +146,7 @@ public class ClientHelperImpl implements ClientHelper, ClientModInitializer {
@Override
public void sendDeletePacket() {
- if (ScreenHelper.getLastHandledScreen() instanceof CreativeInventoryScreen) {
+ if (REIHelper.getInstance().getPreviousHandledScreen() instanceof CreativeInventoryScreen) {
MinecraftClient.getInstance().player.inventory.setCursorStack(ItemStack.EMPTY);
return;
}
@@ -257,7 +257,7 @@ public class ClientHelperImpl implements ClientHelper, ClientModInitializer {
screen = new VillagerRecipeViewingScreen(map, category);
} else if (ConfigObject.getInstance().getRecipeScreenType() == RecipeScreenType.UNSET) {
@Nullable Identifier finalCategory = category;
- screen = new PreRecipeViewingScreen(ScreenHelper.getLastHandledScreen(), RecipeScreenType.UNSET, true, original -> {
+ screen = new PreRecipeViewingScreen(REIHelper.getInstance().getPreviousHandledScreen(), RecipeScreenType.UNSET, true, original -> {
ConfigObject.getInstance().setRecipeScreenType(original ? RecipeScreenType.ORIGINAL : RecipeScreenType.VILLAGER);
ConfigManager.getInstance().saveConfig();
openRecipeViewingScreen(map, finalCategory, ingredientNotice, resultNotice);