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

item borders incompatibility with 3.0.0 #65

Closed vex-ace closed 10 months ago

vex-ace commented 10 months ago

(2.0.0) 2023-10-13_04 29 26 (3.0.0) 2023-10-13_04 22 13

yurisuika commented 10 months ago

I have one idea on how this might be supported. I can confirm this is on both Forge and Fabric, and 1.19.x does not work either.

It will probably involve adding a "catch" for injections around certain HUD elements. This mod injects AFTER the drawItemInSlot calls in renderHotbarItem.

yurisuika commented 10 months ago

I'm not really sure the answer to this one yet. Perhaps it has something to do with its custom Iceberg library. It seems to use that for drawGradientRect instead of fillGradient from DrawContext or DrawableHelper. That could have something to do with it, my best guess right now.

At the end of the day, this is all stuff that I am unfamiliar with, so my recommendation for now is to just use <=2.x for now.

yurisuika commented 10 months ago

Okay, I rewrote their mod (never submitted that previous comment so its why its like from a minute before this one) to use the vanilla gradient stuff and that wasn't it. But then I looked around and traced the methods back and bam it hit me like how did I not notice that before.

image So it doesn't use the stack for the hotbar. I don't know why, but that is the source of the issue here. It is creating a new stack. If you were to make it use the stack (like I did in that screenshot), it would work. This would have to be fixed on their end.

image

yurisuika commented 10 months ago

The reason this is not an issue with 2.x or earlier is because Raised worked differently back then. Raised modified the Y value which was inherited down the line all the way to the hotbar item's render method which this mod took its Y value from. Now Raised translates the matrix stacks instead. This mod does not use the stack for the hotbar for some reason. The two ways cannot be done at the same time or else it would just double the vanilla stuff.