Architectury API (Fabric/Forge/NeoForge)

Architectury API (Fabric/Forge/NeoForge)

158M Downloads

Forge 1.19.3 - Appending items via CreativeTabRegistry "randomizes" the position in the tab

Lemonszz opened this issue ยท 2 comments

commented

Using the CreativeTabRegistry to append RegistrySupplier or Item ends up up with them in a random position.
No issues on Fabric. Could be an issue with Forge, but I didn't see any reports on their repo.

Position seems to be random each time.

            for(RegistrySupplier<Item> item : ItemHelper.getItems(Constants.MOD_ID))
            {
                CreativeTabRegistry.append(TAB, item);
            }

Forge

Fabric


Further Tests

Directly adding items

            //Directly adding items
            CreativeTabRegistry.append(TAB, BMItems.SCUTTLER_TAIL);
            CreativeTabRegistry.append(TAB, BMItems.CYAN_PETALS);
            CreativeTabRegistry.append(TAB, BMItems.BULBUS_ROOT);
            CreativeTabRegistry.append(TAB, BMItems.COWBOY_HAT);

(Still out of order)

Vanilla Items

            //Adding Vanilla Items
            CreativeTabRegistry.append(TAB, Items.GLOW_INK_SAC);
            CreativeTabRegistry.append(TAB, Items.INK_SAC);
            CreativeTabRegistry.append(TAB, Items.ACACIA_BOAT);
            CreativeTabRegistry.append(TAB, Items.GREEN_CANDLE);

(Also out of order)

commented

Update: If you add items via the builder of the CreativeTab, then its order is retained.
For more information please check MinecraftForge/MinecraftForge#9192

commented

Looks like they redid the event but they didn't close their issue, so I didn't notice that.
I have updated architectury API to use the new event.