Search in sources :

Example 1 with IBookshelfBlock

use of net.darkhax.bookshelf.block.IBookshelfBlock in project Bookshelf by Darkhax-Minecraft.

the class RegistryHelper method generateBlockItem.

private void generateBlockItem(ForgeRegistryHelper<Block> registry, Block block) {
    final Item.Properties itemProps = block instanceof IBookshelfBlock ? ((IBookshelfBlock) block).getItemBlockProperties() : new Item.Properties();
    if (itemProps != null) {
        final Item item = new BlockItem(block, itemProps);
        item.setRegistryName(block.getRegistryName());
        this.items.register(item);
    }
}
Also used : Item(net.minecraft.item.Item) BlockItem(net.minecraft.item.BlockItem) IBookshelfBlock(net.darkhax.bookshelf.block.IBookshelfBlock) BlockItem(net.minecraft.item.BlockItem)

Aggregations

IBookshelfBlock (net.darkhax.bookshelf.block.IBookshelfBlock)1 BlockItem (net.minecraft.item.BlockItem)1 Item (net.minecraft.item.Item)1