Skip to content

Commit c6f9e33

Browse files
committed
Add support for item tab icon suppliers.
1 parent 933a5e2 commit c6f9e33

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Common/src/main/java/net/darkhax/bookshelf/api/item/ICreativeTabBuilder.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ default BT setIcon(ItemStack icon) {
2222
return setIcon(() -> icon);
2323
}
2424

25+
default BT setIconItem(Supplier<ItemLike> iconSupplier) {
26+
27+
return this.setIcon(() -> new ItemStack(iconSupplier.get()));
28+
}
29+
2530
BT setIcon(Supplier<ItemStack> iconSupplier);
2631

2732
BT setEnchantmentCategories(EnchantmentCategory... categories);

0 commit comments

Comments
 (0)