How can I get my building system to acknowledge the collision of blocks?

Hello developers, I’m trying to make my building system support decimal point Y values when placing blocks, but because of the way it’s coded currently when positioning the blocks, it clips through the block I’m trying to put my other block on top of.

How do I prevent this from happening?

Any help with this is massively appreciated,
Thanks, MBroNetwork.

Edit: I’ve figured it out.