Skip to content

Commit

Permalink
[fix] screens that return to old screens not closing properly
Browse files Browse the repository at this point in the history
  • Loading branch information
JackFred2 committed Aug 6, 2023
1 parent 59978b9 commit 3e10c21
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ public static boolean doSearch(SearchRequest request) {
WhereIsItClient.LOGGER.debug("Search results: %s".formatted(results));
if (WhereIsItConfig.INSTANCE.getConfig().getClient().closeGuiOnFoundResults && !closedScreenThisSearch) {
closedScreenThisSearch = true;
if (Minecraft.getInstance().screen != null) Minecraft.getInstance().screen.onClose();
if (Minecraft.getInstance().screen != null && Minecraft.getInstance().player != null)
Minecraft.getInstance().player.closeContainer();
}
WorldRendering.addResults(results);
});
Expand Down

0 comments on commit 3e10c21

Please sign in to comment.