Compatibility request: fire a PlayerInteractEvent.LeftClickBlock from PartLeftClickPacket
desht opened this issue ยท 7 comments
Describe the feature
Please see FTBTeam/FTB-Mods-Issues#634 for some background.
In summary, because AE2 uses a custom packet to send player left click events on the Conversion Monitor to the server, protection mods such as FTB Chunks don't get a chance to see the click on the server, and thus can't protect the clicked block from interaction.
A viable fix would be to fire a PlayerInteractEvent.LeftClickBlock
from the server side packet handler and only proceed if that event doesn't get cancelled.
Reasons why it should be considered
This would help integration with chunk protection mods, where SMP players want to keep their stored inventory safe. I'm aware that AE2 has its own security system, but it would be desirable to allow other protection mods to work here too.
Additional details
No response
If you're referring to Level#mayInteract()
, all that does is check for spawn protection and world border.
Hm. Don't protection mods hook into that? It should be what we previously checked for part placement et al.
Pretty sure you still use that, but it's not sufficient on its own for a mod like FTB Chunks, where players have specific chunk claims...
I noticed the above commit - thanks for that. But is that Fabric-only? Not sure how your multi-platform stuff works, but I don't see an equivalent Forge event being fired.