FancyMenu [Fabric] [MOVED TO NEW PROJECT]

FancyMenu [Fabric] [MOVED TO NEW PROJECT]

16M Downloads

[1.19.2] [Forge+Fabric] FancyMenu breaks button rendering and entity in inventory rendering in the Armor Statues mod

Fuzss opened this issue ยท 5 comments

commented

Describe the issue
Both parts of the issue seem to be related to this hook of yours:

AbstractWidget bt = (AbstractWidget)((Object)this);

  1. The navigation buttons on the left side don't show as disabled when they are. This probably comes from FancyMenu not handling vanilla's ImageButton correctly. You simply call AbstractButton:: getYImage, which doesn't work for ImageButton, as the inactive texture is at y index 2 not 0 as with other buttons. This is a really annoying issue in vanilla, but since this is a vanilla class and other mods might be using it, too, it would be great to add a special case for those instances.
  2. The buttons for selecting poses render in front of the entity previews. When rendering buttons the z-level (blitOffset) is way too high, they render in front of anything in InventoryScreen::renderEntityInInventory, which renders with an offset of 50. I tried around a bit and I can't fix this on my end, 900 is the max blit offset that's possible before the entities no longer render (because they are behind the camera then? not sure, since buttons still show with a higher offset), but you seem to be rendering the buttons at a higher value.

Screenshots
What it looks like with your mod:
2022-10-16_13 09 44
How it looks without it:
2022-09-29_08

Basic Informations (please complete the following information):

  • OS: Mac
  • FancyMenu Version: fancymenu_fabric_2.12.2_MC_1.19-1.19.2
  • Fabric Version: 0.14.9
  • Minecraft Version: 1.19.2
  • Active Mods: only dependencies for FancyMenu and Armor Statues
commented

Both parts of the issue seem to be related to this hook of yours

The ImageButton class doesn't use the renderButton() body of AbstractWidget, because it completely overrides it.
It was actually caused by another mixin (of the ImageButton class), but I think I was able to fix it! :)
Fix will be part of the next update!

commented

Awesome, thank you!

commented

Fixed in FancyMenu v2.12.4! Thank you for telling me! :)

commented

Please check if it's really fully fixed. I think it was working fine in my tests, but maybe you notice something I missed.

commented

As an original reporter of this issue, I can say that the bug had been fixed on my end. Thanks for the fix!