Open Attack8 opened 1 month ago
world.destroyBlock(pos, false)
does not cause any block break events to be fired, so I don't believe this approach will work to account for claim protection mods (more precisely, it'll probably fix the original problem, but introduce a new one, where players can use a wrench to steal blocks from other players' claims). The false
return from the method is purely based on vanilla checks.
You can give it a try yourself but it worked for me in testing. I will do further testing to confirm
Did you try it with a mod like FTB Chunks installed, in a claim you can't normally break blocks in?
Arguably that's not necessarily a bug, since block-breaking is a feature of sneak+right-clicking the wrench, which is an item interaction rather than a block break. But from a gameplay point of view, it's equivalent to breaking a block, so if a player chooses to allow item interaction in their claims, they may be surprised when someone else comes in and steals their blocks...
Did you try it with a mod like FTB Chunks installed, in a claim you can't normally break blocks in?
Yes, I did
Arguably that's not necessarily a bug, since block-breaking is a feature of sneak+right-clicking the wrench, which is an item interaction rather than a block break. But from a gameplay point of view, it's equivalent to breaking a block, so if a player chooses to allow item interaction in their claims, they may be surprised when someone else comes in and steals their blocks...
Yes, I agree that it's a bug; it doesn't make sense gameplay-wise
Needs more 1.20.1 specific testing
Should be pretty easy to get around; fire a Forge BlockEvent.BreakEvent
before attempting to break the block, and if the event comes back canceled, don't proceed.
Yea, I’ll take a look at it this evening after school with specifically 1.20.1 since I can’t reproduce the bug in 1.18.2
Ok, fixed
Fixes FTBTeam/FTB-Mods-Issues#1162 Fixes #6465