I'm making a super simple GUI for my server using a texture pack, however the actual UI is slightly off-centred, and I'm not sure how to fix it. Right now, I'm using a font for the GUI, and then putting that character in the title, but I can get it to move any further left. I think this is a padding issue with normal chests. If there's a fix / better way to add a GUI I'd appreciate it.
#ChestUI Offset Issue
1 messages · Page 1 of 1 (latest)
Welcome to the help forum!
Please make sure to read #1029373817119838218 as it may answer your question!
Once your question has been resolved, please mark the post as closed by using the </close:1163944441741049897> command.
You'd need to put a character with a negative width at the start of your chest name (so that your UI characters would move further to the left).
-# and in general make the color of its name white assuming it shouldn't be dark gray like that
Do you know a good character I can use
Doesn't really matter which one you use. You can always add more fonts after all 🤷♂️
I can only find zero-width characters, I can't find any negative widths
yeah, you need to make them yourself
Oh wait what
Same way you added the gui texture to character(s), just that you specify some random texture (like stone), give it a negative size and a really negative offset so it's never visible.
Will that affect the actual texture of the block?
e.g. stone
Oh nvm I understand it now
@austere herald I'm getting this error now
does the output log throw any errors/warnings before that?
I don't think so
"providers": [
{
"type": "bitmap",
"file": "item/font/ranks/logo.png",
"ascent": 64,
"height": 64,
"chars": ["\uE100"]
},
{
"type": "bitmap",
"file": "item/font/ranks/chest_ui.png",
"ascent": 27,
"height": 256,
"chars": ["\uE101"]
},
{
"type": "bitmap",
"file": "item/font/ranks/scoreboardheader.png",
"ascent": 64,
"height": 102,
"chars": ["\uE102"]
},
{
"type": "bitmap",
"file": "minecraft:textures/block/stone.png",
"ascent": -100,
"height": 16,
"chars": ["\uE0FF"],
"x": -100,
"width": 16
},
{
"type": "space",
"advances": {
"\uE0FF": -8
}
}
]
}
this is my default.json
chest_ui is the gui
oh, you already have a negative space entry at the very end there
and where did "x": -100 come from 🤔 ?
but yeah, was thinking of the old method with the negative sized bitmaps, space providers are the cleaner solution (like your \uE0FF there)
so naming your chest \uE0FF\uE101 should already offset it to the left and display your chest_ui
Ok thanks let me try it
Wait, how do you name a chest \uE0FF
i've just been using the actual copy-pasteable unicode character
just for testing it ive been using an anvil
/give @s chest[custom_name="\\uE0FF\\uE101"]
Did you make sure the resource pack is equipped properly now after the earlier problem?
what did you use before to have it show up as your custom texture 🤔 ?
ah, should only be one \, not two, my bad.
/give @s chest[custom_name={"color":"white","text":"\uE0FF\uE101"}]
depends on the "java code"
probably fastest to try it out and see if it works (looks like it could work though, assuming you can add chat color and the name like that)
@austere herald Hi, do you know how to make icons that are the same size as chat, but are more than 8px in height
For example this on another server
When I try change the height, it just makes the icon bigger
And overflow out of chat
yeah, height determines how big it is being displayed (no matter how big the actual texture is)
so you should keep height as like 8 or 9 iirc
But when I make the height 8px, it makes the texture all blurry and does some weird thing to it
well, you can only display so many pixels on a limited size