Skip to content

Commit

Permalink
fix: creative tab crash related to search tab
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Jun 10, 2024
1 parent 111d6ef commit 5765bc5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void onModifyEntries(CreativeModeTab group, FabricItemGroupEntries
stack.set(DataComponentRegistry.BOOK_ID.get(), b.getId());

if(searchDupes.add(stack))
entries.accept(stack);
entries.accept(stack, tabKey == CreativeModeTabs.SEARCH ? CreativeModeTab.TabVisibility.SEARCH_TAB_ONLY : CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS);
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static void onCreativeModeTabBuildContents(BuildCreativeModeTabContentsEv
stack.set(DataComponentRegistry.BOOK_ID.get(), b.getId());

if (searchDupes.add(stack)) {
event.accept(stack);
event.accept(stack, event.getTabKey() == CreativeModeTabs.SEARCH ? CreativeModeTab.TabVisibility.SEARCH_TAB_ONLY : CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static void onCreativeModeTabBuildContents(BuildCreativeModeTabContentsEv
stack.set(DataComponentRegistry.BOOK_ID.get(), b.getId());

if (searchDupes.add(stack)) {
event.accept(stack);
event.accept(stack, event.getTabKey() == CreativeModeTabs.SEARCH ? CreativeModeTab.TabVisibility.SEARCH_TAB_ONLY : CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS);
}
}
}
Expand Down

0 comments on commit 5765bc5

Please sign in to comment.