Chisels-and-Bits icon indicating copy to clipboard operation
Chisels-and-Bits copied to clipboard

`RightClickEventHandler`'s overwriting of `useBlock` causes hard-to-debug issues with other mods and is just painfully incompatible.

Open alcatrazEscapee opened this issue 2 years ago • 0 comments

Version: 1.18.2, Chisel + Bits 1.2.114.

This right here:

https://github.com/ChiselsAndBits/Chisels-and-Bits/blob/8b85f958fbffd9dd3394f7c65685022d20bcf11b/platforms/forge/src/main/java/mod/chiselsandbits/forge/events/RightClickEventHandler.java#L33

has caused me a massive headache trying to debug an issue filed with TFC: (https://github.com/TerraFirmaCraft/TerraFirmaCraft/issues/2254). In short: this overwrites, unconditionally any setting of this field by other mods, even when chisel + bits doesn't actually need to. For instance, if RightClickInteractionHandler.rightClickOnBlock returns DEFAULT, then there's no reason to be forcibly setting the behavior, as you're almost by definition, not handling anything here.

Please don't call setUseBlock() unconditionally on every invocation of this event. Other mods may also want to use this field, and more importantly, don't forcibly reset to DEFAULT if another mod has already done something here.

alcatrazEscapee avatar Feb 02 '23 18:02 alcatrazEscapee