Chest Tracker

Chest Tracker

355k Downloads

[1.19] Incompatibility with Stylish Effects mod

Fuzss opened this issue ยท 0 comments

commented

See here: Fuzss/stylisheffects#14

The reason for this is your Mixin in MinecraftClient::setScreen, which hooks in when the screen is removed which I skip as the call to Screen::remove is too early. In my Stylish Effects mod I implement general callbacks for screens being opened and closed, just as Forge does it as I'm using a multiloader setup for developing on both mod loaders simultaneously.

I know this is actually my fault for skipping vanilla's Screen::remove which I manually do later when the screen callbacks have been able to properly process everything, but just where your Mixin is placed Fabric Api actually runs it's own ScreenEvents.Remove callback.

Would it be possible for your to migrate to this callback to allow for mod compatibility this way? The only issue that comes to mind here is that the Fabric callback runs after Screen::remove has been called, but your current hook is placed before the call. So is there any reason for your to run before, or would afterwards be fine? I think the only relevant thing that changes in Screen::remove is the item stack carried by the cursor being placed back into the player inventory, not sure if it's relevant for you to run before that happens?