Search in sources :

Example 1 with ItemMMDBlock

use of com.mcmoddev.lib.item.ItemMMDBlock in project BaseMetals by MinecraftModDevelopmentMods.

the class Blocks method maybeMakeItemBlock.

private static void maybeMakeItemBlock(final Block block, final MMDMaterial material, final String fullName) {
    if (!(block instanceof BlockAnvil) && !(block instanceof BlockDoor) && !(block instanceof BlockSlab) && (!material.isEmpty())) {
        final ItemBlock itemBlock = new ItemMMDBlock(material, block);
        itemBlock.setRegistryName(block.getRegistryName());
        itemBlock.setUnlocalizedName(block.getRegistryName().getResourceDomain() + "." + fullName);
        material.addNewItem("ItemBlock_" + fullName, itemBlock);
    }
}
Also used : BlockDoor(net.minecraft.block.BlockDoor) ItemMMDBlock(com.mcmoddev.lib.item.ItemMMDBlock) BlockSlab(net.minecraft.block.BlockSlab) BlockAnvil(net.minecraft.block.BlockAnvil) ItemBlock(net.minecraft.item.ItemBlock)

Aggregations

ItemMMDBlock (com.mcmoddev.lib.item.ItemMMDBlock)1 BlockAnvil (net.minecraft.block.BlockAnvil)1 BlockDoor (net.minecraft.block.BlockDoor)1 BlockSlab (net.minecraft.block.BlockSlab)1 ItemBlock (net.minecraft.item.ItemBlock)1