Page turning buttons in creative inventory don't appear in 22w45a
Iunius118 opened this issue ยท 3 comments
- Fabric version: 0.66.1+1.19.3
I'm trying to add an item group, but the page turning buttons don't appear in the creative inventory and I can't see the tab I added.
FabricItemGroup.builder(new Identifier("modid", "test_group_0"))
.displayName(Text.literal("Test Item Group: 0"))
.icon(() -> new ItemStack(Registries.BLOCK.get(1)))
.entries((enabledFeatures, entries, operatorEnabled) -> {
entries.add(new ItemStack(Registries.ITEM.get(1)));
})
.build();
Curiously, when two item groups are added, the buttons show up.
for (int i = 0; i < 2; i++) {
final int index = i + 1;
FabricItemGroup.builder(new Identifier("modid", "test_group_" + i))
.displayName(Text.literal("Test Item Group: " + i))
.icon(() -> new ItemStack(Registries.BLOCK.get(index)))
.entries((enabledFeatures, entries, operatorEnabled) -> {
entries.add(new ItemStack(Registries.ITEM.get(index)));
})
.build();
}
It seems like the buttons are visible when there are more than 14 item groups:
In vanilla, the operator item group may not be present at all times. What happens if you make the operator item group visible? It seems like Fabric assumes that the operator item group is included in the item group list when determining whether another page is needed.
Fixed with #2653