aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-04-18 15:06:19 +0800
committershedaniel <daniel@shedaniel.me>2020-04-18 15:06:19 +0800
commitca2bb09ae0b22831c195453f0ccc47a8eb83a43c (patch)
treef6ee754180d3feb9da2799269199ee8e683ff8ec /src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java
parent8fd2f6ee7494b3623431319e4cc8056c4d6096d3 (diff)
downloadRoughlyEnoughItems-ca2bb09ae0b22831c195453f0ccc47a8eb83a43c.tar.gz
RoughlyEnoughItems-ca2bb09ae0b22831c195453f0ccc47a8eb83a43c.tar.bz2
RoughlyEnoughItems-ca2bb09ae0b22831c195453f0ccc47a8eb83a43c.zip
Deprecate old ScreenHelper.getLastHandledScreen in favour of REIHelper.getPreviousHandledScreen
Signed-off-by: shedaniel <daniel@shedaniel.me>
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);