Cancels the Block Break Event, but the block still drops causing a copy item bug

I canceled the block break event, which was broke by items in the ‘‘Thaumcraft 6’’ mod, but the block item still drop. This leads to block item replication bugs.
How to prevent?

A similar thing happened to be on Bukkit.

Try listening to SpawnEntityEvent.Custom (its probably custom). Then on block break you store the location(s) which then on your SpawnEntityEvent you cancel the spawning of items around the blocks you stored.

After a tick from the block break event (or two) you may want to remove the location from the list which will allow items spawning there for other reasons

1 Like

that’s clever, This is a regions-protection plugin I wrote. I tried to use RedProtect to see how it defended, It also doesn’t work to some mod items, your solution is effective, thank you very much!

1 Like

While the proposed workaround might work the true solution would be to report it on Github and to fix the bug properly in SpongeForge.

1 Like

that’s not a spongeforge bug, that’s due to mod developer not developing according to the regulation.
I decompiled the Thaumcraft code and found that the setBlock and the dropBlock were separate.

So it should be reported to the author of Thaumcraft if it’s not already done.

Not sure if they are willing to support the sponge, I will try to report.

1 Like