Closed KekeCreations closed 3 months ago
Minecraft Version: {Minecraft version. *1.21}
NeoForge Version: {NeoForge version. 21.0.0-beta,}
Steps to Reproduce:
Description of issue: My code for sorting creative categories, this should work yet it doesn't
`private void addAfter(BuildCreativeModeTabContentsEvent event, Item beforeItem, Item item) { event.getEntries().putAfter(beforeItem.getDefaultInstance(), item.getDefaultInstance(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); } private void addAfter(BuildCreativeModeTabContentsEvent event, Block beforeItem, Item item) { event.getEntries().putAfter(beforeItem.asItem().getDefaultInstance(), item.getDefaultInstance(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); } private void addAfter(BuildCreativeModeTabContentsEvent event, Item beforeItem, Block item) { event.getEntries().putAfter(beforeItem.getDefaultInstance(), item.asItem().getDefaultInstance(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); } private void addAfter(BuildCreativeModeTabContentsEvent event, Block beforeItem, Block item) { event.getEntries().putAfter(beforeItem.asItem().getDefaultInstance(), item.asItem().getDefaultInstance(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); } private void addBefore(BuildCreativeModeTabContentsEvent event, Block beforeItem, Block item) { event.getEntries().putBefore(beforeItem.asItem().getDefaultInstance(), item.asItem().getDefaultInstance(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); } private void addBefore(BuildCreativeModeTabContentsEvent event, Item beforeItem, Item item) { event.getEntries().putBefore(beforeItem.getDefaultInstance(), item.getDefaultInstance(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); } public void creativeItemGroups(BuildCreativeModeTabContentsEvent event) { if (event.getTabKey() == CreativeModeTabs.COLORED_BLOCKS) { addAfter(event, Blocks.PINK_GLAZED_TERRACOTTA, KekeBlocks.TERRACOTTA_SHINGLES.get()); addAfter(event, KekeBlocks.TERRACOTTA_SHINGLES.get(), KekeBlocks.TERRACOTTA_SHINGLE_STAIRS.get()); addAfter(event, KekeBlocks.TERRACOTTA_SHINGLE_STAIRS.get(), KekeBlocks.TERRACOTTA_SHINGLE_SLAB.get()); addAfter(event, KekeBlocks.TERRACOTTA_SHINGLE_SLAB.get(), KekeBlocks.TERRACOTTA_SHINGLE_WALL.get()); }`
Result is items being the correct category but unsorted
I asked someone for help to see if my code was the issue and they said this!
Linking the other previous issue report for reference https://github.com/neoforged/NeoForge/issues/1040 https://github.com/neoforged/NeoForge/issues/886
Minecraft Version: {Minecraft version. *1.21}
NeoForge Version: {NeoForge version. 21.0.0-beta,}
Steps to Reproduce:
Description of issue: My code for sorting creative categories, this should work yet it doesn't
Result is items being the correct category but unsorted
I asked someone for help to see if my code was the issue and they said this!