The best open source alternative to Blockly is Scratch. If that doesn't suit you, our users have ranked more than 10 alternatives to Blockly and nine of them is open source so hopefully you can find a suitable replacement. Other interesting open source alternatives to Blockly are Snap! (Free, Open Source), EduBlocks (Free, Open Source), Waterbear (Free, Open Source) and Bingo (Free, Open Source).
Snap! (formerly BYOB) is a visual, drag-and-drop programming language. It is an extended reimplementation of Scratch (a project of the Lifelong Kindergarten Group at the MIT Media Lab) that allows you to Build Your Own Blocks.
Bingo is a programming language based on Scratch by MIT which uses a "block" UI, where the user can snap together different blocks to make more advanced scripts. There are many added blocks to Scratch 1.4.