Minenash / CustomHUD

A highly customizable variable-based text HUD for Minecraft
MIT License
80 stars 23 forks source link

Lines with hex colors not positioned correctly on right sections #38

Closed plutonium-239 closed 2 years ago

plutonium-239 commented 2 years ago

Having this makes text not show properly in the right sections (top and bottom):

==Section:TopRight==
Looking at: {{tbx, "{tbx}, {tby}, {tbz}", "the sky"}} with a 
light level of &{ff7c0aff}{light}/{light_sky}&f

Chunk co-ords:
(chunk): {cx}, {cy}, {cz}
(inside chunk): {icx}, {icy}, {icz}
&{ffdeadff}Biome: {biome}&f

image Text not aligning properly to the right

Left side doesn't have this problem because text starts from left which is.... left aligned

plutonium-239 commented 2 years ago

Update: turns out the &{ff7c0aff} causes it (similary the &{ffdeadff} for the biome one)

Minenash commented 2 years ago

Well... that's interesting

plutonium-239 commented 2 years ago

@Minenash any idea on why its happening?

Minenash commented 2 years ago

Well... that was dumb. In the renderer part of the code is split depending if a line has a hex color or not. Both parts have a line of code that gets the starting x value. For some reason the one for the hex colors used the window's height not width... idk how that happened

Reopening until I get a release out

plutonium-239 commented 2 years ago

glad that we found the problem!

plutonium-239 commented 2 years ago

Also, does {axolotls} only work on singleplayer? On a multiplayer server it was only showing to be "-"

plutonium-239 commented 2 years ago

Any updates on this?

Minenash commented 2 years ago

Fix released in (the non-beta) v2.0.0 update. It's 1.19, and I might make a non-beta 1.18 release later

plutonium-239 commented 2 years ago

later....? :) (mainly because no one wants to switch to 1.19 now because of what is happening)