ShayBox / Durability101

A rewrite of the original Durability101 mod
https://curseforge.com/minecraft/mc-mods/durability101
MIT License
5 stars 5 forks source link

Rendering over tooltips #3

Closed Darkere closed 3 years ago

Darkere commented 4 years ago

The durability numbers render over tooltips making them look weird.

image

Forge: 31.1.18 Durability101-1.15-0.0.3

ShayBox commented 4 years ago

I just saw this bug on a youtube video, seems it might be a vanilla issue, but I haven't been able to recreate it image

Trnrr commented 4 years ago

Hello I just wanted to say I also get this issue on forge 1.16 32.0.75 & durability101-1.16-0.0.3. image

pajicadvance commented 4 years ago

Happens on Fabric as well. durability101-1.16-0.0.3, fabric loader 0.9.0 build 204 2020-08-09_00-47

ZephaniahNoah commented 3 years ago

It looks like you are doing your translate too high. matrices.translate(0.0D, 0.0D, 500.0F); am I wrong? 500 is really high.

ZephaniahNoah commented 3 years ago

I cloned the repo and tested some numbers in debug mode. It seems 258 is the perfect z level. It's high enough to not clip into blocks. It might clip into some models from other mods though. Tooltips are rendered at z level 400. So anything between these two numbers should be fine.

ShayBox commented 3 years ago

Earlier versions of Minecraft don't have z-translation problems, however around 1.13-1.15 they switched to a new rendering engine, they dynamically add to a z-offset variable, which is hard to get access to, and with other mods and coremods messing with it, it can be hard to find a single good value, I just rebased all versions of my mod and tested every version, 750 works both in dev and a fresh install of every version, so if it's broken now it's because of another mod or older modloader version than latest, hopefully this fixes it for you.

Laifsyn commented 1 year ago

image I have a funnier image example here. I suggest as immediate solution a button to toggle its rendering