Botania

Botania

133M Downloads

Dupe with bore and block protection.

colinrgodsey opened this issue ยท 3 comments

commented

Version Information

Forge version: 1.12.2-14.23.2.2611
Botania version: r1.10-353

Noticed this with a claims management plugin and botania. If you have a bore burst attempt to break a block, it'll drop the items even if something prevents the block from being broken.

https://github.com/Vazkii/Botania/blob/938aab69e5c46d782af3fdb9d647ccd754651853/src/main/java/vazkii/botania/common/item/lens/LensMine.java#L67

Think it's an easy enough fix, I can open a PR when im by my dev env next. Should be able to double-check if the block is air after trying to set it, and not dropping if its not air.

commented

does the claim plugin make setBlockToAir return false if it failed? if so, you can just check the boolean result of that instead of querying the world state again

commented

I'd imagine it does, this plugin in question is a sponge plugin, but for this event sponge just wraps the normal forge event:

https://github.com/SpongePowered/SpongeForge/blob/5087d8342d0ed2f6ae5f7dd8941115f29d9b29a1/src/main/java/org/spongepowered/mod/event/SpongeForgeEventFactory.java#L267

So I imagine this would also effect any pure forge forms of block protection too. Need to confirm whether or not setBlockToAir will return false, but i imagine it will?

commented

This issue is stale because it has been open for a while with no activity. Remove stale label or comment or this will be closed soon.