Started by 
Evolving_Code
 on 
    Topic category: Advanced modding
I'm trying to register an IBlockColor, but I can't get block from elements list. Maybe I don't understand something? Please, help me to find sollution.
public void initElements() {
		elements.blocks.add(() -> new CustomBlock());
		Block regblock = <<get the block?>>;
		Minecraft.getInstance().getBlockColors()
			.register((state, world, pos, tintIndex) -> world != null && pos != null ? BiomeColors
				.getFoliageColor(world, pos) : FoliageColors.getDefault(), regblock);
		elements.items
				.add(() -> new BlockItem(block, new Item.Properties().group(ItemGroup.BUILDING_BLOCKS)).setRegistryName(block.getRegistryName()));
		
 	}
up