when you place a block (from your mod ideally) override onBlockAdded and perform some checks for the near blocks. You must consider where that block might go. Example: railcraft has tanks. When you place any of the blocks it performs a check counting how many blocks there are in x, y and z. If one of them is 1 (1 layer) the other 2 are the height and width of the tank. After that, check if the structure is valid and, if it is, find the center block and set its tile entity (all of the blocks probably have a tile entity I would guess) to store all the data (size, pos, fluid, amount...). You might want to set the metadata of the blocks "part of a multiblock" to some value (maybe different values based on position) for rendering purposes. The trick to make it look cool is, of course, connected textures. Hope this helps!