First you have to make a torch that emits normal light. Than you have to make the blocks without collision and bounding box, i don't know how to do that, maybe someone else does. Than you add the onBlockPlacedBy method to your torch class. In the onBlockPlacedBy method, you need to add some if statements to place the block, but not replace blocks that aren't air. Than add the breakBlock method to your torch class, and do the opposite of the onBlockPlacedBy method, to replace your colored blocks with air, but not the blocks that aren't your colored blocks. (Sorry if the spelling is exactly right, english isn't my first language either)