use of net.tslat.aoa3.block.decoration.slabs.SlabBlock in project Advent-Of-Ascension by Tslat.
the class BlockRegister method registerBlock.
private static void registerBlock(IForgeRegistry<Block> registry, Block block, String modelSubfolder, String... oreDictKeys) {
registry.register(block);
ItemBlock itemBlock;
if (block instanceof SlabBlock.DoubleSlabBlock) {
BlockSlab halfBlock = ((SlabBlock) block).getHalfBlock();
blockRegistryList.add(new BlockRegistryWrapper(halfBlock, (ItemSlab) new ItemSlab(halfBlock, halfBlock, (SlabBlock.DoubleSlabBlock) block).setRegistryName(halfBlock.getRegistryName()), "blocks/decoration/slabs/", oreDictKeys));
blockRegistryList.add(new BlockRegistryWrapper(block, null, null));
registry.register(halfBlock);
return;
} else if (block instanceof LampBlock) {
LampBlock offLamp = ((LampBlock) block).getOffLamp();
blockRegistryList.add(new BlockRegistryWrapper(offLamp, (ItemBlock) new ItemBlock(offLamp).setRegistryName(offLamp.getRegistryName()), modelSubfolder, oreDictKeys));
blockRegistryList.add(new BlockRegistryWrapper(block, (ItemBlock) new ItemBlock(block).setRegistryName(block.getRegistryName()), modelSubfolder));
registry.register(offLamp);
return;
} else {
itemBlock = (ItemBlock) new ItemBlock(block).setRegistryName(block.getRegistryName());
}
blockRegistryList.add(new BlockRegistryWrapper(block, itemBlock, modelSubfolder, oreDictKeys));
}