kotmatross28729 / WorldTooltipsShadersFix

World-Tooltips, but works with shaders
Other
2 stars 0 forks source link

Bug with ItemPhysics and Minecraft GUI Scale, different from normal #1

Closed Omgise closed 11 months ago

Omgise commented 11 months ago

屏幕截图 2023-10-30 152507

kotmatross28729 commented 11 months ago

Well, it's not related to this mod. I see you are using itemphysics? This happens if in itemphysic.cfg - B:customPickup=true, and your GUI Scale = Large. You can disable customPickup, or set GUI Scale to normal. Maybe I'll fork itemphysics and fix it, but not in these 5 days for sure.

Omgise commented 11 months ago

Ok, thank you for your help :)

kotmatross28729 commented 11 months ago

Oh, ok, this seems a LOT harder than I thought. The only thing I managed to do, was to make """normal""" looking only text, when GUI Scale = Large, but as I understand, if the monitor resolution is other than 1920x1080, then this will no work. In addition, I don’t yet have information on exactly how GUI Scale works (Below is "approximately" how it works), much less how work with it; in the original code (itemphysics), for some unknown reason, it divides everything by 4, and in some places by 2.

And, if look at it another way, itemphysics still renders the text in the center, but with GUI Scale = Large, it seems to “offset” the center, because of this, it seems that it is the text from itemphysics is offset, but in fact, Minecraft itself offset the center, and itemphysics simply does not adapt to this offset. I will continue to look for solutions, but I won't promise anything yet.

Also, If you want to help, can you please tell me about any mods for 1.7.10 (preferably open source) that render something in the center of the screen? so, I can at least understand how to work with this GUI Scale (of course, if they themselves do it correctly)

Omgise commented 11 months ago

How about this: https://github.com/Jedibrine/attackindicators

kotmatross28729 commented 11 months ago

O, thanks! I'll check when I can

kotmatross28729 commented 11 months ago

Fixed the rendering of the item name & power (the one above the hotbar) in dev, now I'll try to fix the gray frame... there will also be compatibility with RightProperGUIScale and any screen resolution (I can only test 1920x1080, but in theory it should work at 2K, 4K and even higher)

kotmatross28729 commented 11 months ago

@Omgise, It turned out to be more difficult than I thought, but I did it! It took almost re-writing the entire method from scratch, but now everything works as it should (I hope). Here is the fork: https://github.com/kotmatross28729/ItemPhysic/releases/tag/1.1.7