MiniHUD

MiniHUD

3M Downloads

Container preview renders parts of the GUI incorrectly when a resource pack is enabled

Arcensoth opened this issue ยท 1 comments

commented

It looks like the bottom-right edges of the GUI are being ripped from the wrong edges of the container texture. This can be seen when enabling a resource pack that changes the shulker box GUI texture:

image

Note that it is possible to change the shullker box GUI texture in vanilla. (Whereas OptiFine allows you change it based on the colour of the box.)

A similar issue can be seen with the chest preview, which incorrectly renders the shulker box GUI:

image

Relevant mods:

  • fabric-api-0.4.0+build.240-1.14
  • malilib-fabric-1.14.4-0.10.0-dev.20
  • minihud-fabric-1.14.4-0.19.0-dev.20191007.003640

Fabric loader:

  • fabric-loader-0.6.3+build.167-1.14.4

[Edit]

I did some code digging and I think both of these problems have something to do with these:

I spent about 10 minutes minutes skimming through code so correct me if I'm wrong, but I feel like the solution involves:

  1. fixing the texture coordinates to capture the container's GUI instead of the player's inventory, and
  2. writing a separate case for shulker box vs chest.
commented

Yes these background renderers can be improved, and in the 1.12 branch there is a new rendering util method for 9-splicing, which should probably also be used for this. It will probably be difficult to splice these together in a way that would work properly for most resource packs, as they might have different styling for the texture edges, which would break with different resource packs with different splicing implementations. If I remember right, the single chest doesn't have a separate texture in vanilla, I think it probably uses the double chest texture(?) But I need to check that.