yurisuika / Raised

Raises the hotbar so the selector is not cut off!
GNU Lesser General Public License v3.0
17 stars 5 forks source link

Compatible with Parcool mod 1.20.1 #81

Closed Kogomre closed 7 months ago

Kogomre commented 7 months ago

Hi, i have a problem with mod Parcool. The more I indent, the more lightning strikes the food bar. Forge 47.2.19 Raised-forge-1.20.1-3.1.1.jar ParCool-1.20.1-3.1.0.6-R.jar

Screenshot_1

yurisuika commented 7 months ago

From the looks of the code, it seem this mod has a config which allows you to set the position of it manually? In which case it would not set its position by the stack (as Raised translates vertically), but rather fully manual control!

I can test it out later to ensure this is the answer, but for now I recommend attempting to try that.

https://github.com/alRex-U/ParCool/blob/main/src/main/java/com/alrex/parcool/client/hud/impl/StaminaHUD.java#L58

Kogomre commented 7 months ago

@yurisuika thx, i test it and back later with answer

yurisuika commented 7 months ago

I've tested it, and it seems that those config options only apply when it is in "normal mode", for which you choose which corner of the screen the bar goes in and thus have a horizontal and vertical offset. Otherwise, the "light" mode these settings do not apply.

yurisuika commented 7 months ago

Okay, it seemed to look like it should work, but I changed the branch to 1.20.2 and I found the issue.

https://github.com/alRex-U/ParCool/blob/1.20.2/src/main/java/com/alrex/parcool/client/hud/HUDRegistry.java

The newer versions of the mod use the overlay registry. Raised does catch these if they use registerBelow or registerAbove, as those reference other vanilla GUI elements. However, registerBelowAll and registerAboveAll do not, as those just place them at the extreme ends. It would appear that this mod does such with registerAboveAll.

So, it would be possible to support this if we added these as well. Currently, the extended mod support option in Raised will toggle support for mods that register on the "non-all" methods. But really since those reference hud elements that we want to catch we shouldn't be cutting those out with that option. Instead, it should be used for these "all" methods, which brings more parity to the render event "all" from 1.18 and earlier, and sort of how that option works in Fabric.

yurisuika commented 7 months ago

2024-02-02_12 45 43

Well there we go, that worked as expected! This will be out in the next release.

Kogomre commented 7 months ago

@yurisuika thank you for your time, you are amazing