This mod adds a single item: the Command Creator. It allows you to select a volume of blocks and compact it down into a single command block. You can then copy the command from the command block and bring it wherever you like. When the command is run, it will unpack whatever you saved before and place it down exactly the way it was before. All block states and nbt data will be saved. You only need the mod to make the command; running the command can work in vanilla Minecraft.
Minecraft Forge mod
Latest supported Minecraft version