Change up how crafting works so that beginning to craft a building places a ghost in hand. Placing a ghost will pull ingredients from your inventory to build it. Mining a building restores the items (if possible - Factorissimo buildings can't be disassembled)
Keep the various "undo" recipes but don't unlock them. They can be used to quickly lookup if a mined entity has an undo recipe, rather than searching all recipes for a match.
It may be needed to have buildings be "only in cursor" items, so that real buildings get placed. On placement, take items from the inventory and put another building in the cursor. This allows reviving ghosts from a copy-paste.
Be sure to add a fancy GUI showing the items needed to build along with how many you have in your inventory!
Change up how crafting works so that beginning to craft a building places a ghost in hand. Placing a ghost will pull ingredients from your inventory to build it. Mining a building restores the items (if possible - Factorissimo buildings can't be disassembled)
Keep the various "undo" recipes but don't unlock them. They can be used to quickly lookup if a mined entity has an undo recipe, rather than searching all recipes for a match.
It may be needed to have buildings be "only in cursor" items, so that real buildings get placed. On placement, take items from the inventory and put another building in the cursor. This allows reviving ghosts from a copy-paste.
Be sure to add a fancy GUI showing the items needed to build along with how many you have in your inventory!