Block transactions are set to invalid, but the block still drops as an item

Hello. I am making a plugin that allows players to create placable blocks that turn into pre-made structures when placed. However, I am really struggling with a pretty severe problem: Blocks that require support will break and drop as an item when lacking the required support. I did, however, mitigate the first problem by setting the respective transaction for the block to invalid. Despite blocks no longer breaking as the transaction is made invalid, they still, however, drop their respective items. And I have tried to mitigate the last problem through cancelling DropItemEvent and entity.remove(), but with no success. What is wrong here?

How are you placing the blocks? Have you tried setting the block with the BlockChangeFlags.NONE? That will change the block but not post a block update to the blocks around it

The blocks are set through the Operations.completeLegacy(builder.build()) method in the WorldEdit API.

UPDATE: Tried your suggestion, but no luck

You could do what the plugin Ships does. Creates a list of the BlockStates (or Snapshots of blocks) and then priorities them based on if they can be attachable to another block. It puts the ones that dont require any other block first and then puts the attachable ones on after.

It also does what i suggested before, being no block update.

Also just out of curiosity. How come your using worldedits version? Instead of sponges built in schematic api?

Well, I am relatively new to the Sponge API, unlike with Bukkit. As for using Sponge’s schematic API, I have never used it and the documentation of the schematic API in Sponge is also extremely poor