#ChestUI Offset Issue

1 messages · Page 1 of 1 (latest)

umbral spindle
#

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.

rigid tundraBOT
#
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.

austere herald
#

-# and in general make the color of its name white assuming it shouldn't be dark gray like that

umbral spindle
austere herald
#

Doesn't really matter which one you use. You can always add more fonts after all 🤷‍♂️

umbral spindle
austere herald
#

yeah, you need to make them yourself

umbral spindle
#

Oh wait what

austere herald
#

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.

umbral spindle
#

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

austere herald
#

does the output log throw any errors/warnings before that?

umbral spindle
#

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

austere herald
#

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

umbral spindle
#

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

austere herald
#

/give @s chest[custom_name="\\uE0FF\\uE101"]

umbral spindle
#

yeah that just does the same thing

austere herald
#

Did you make sure the resource pack is equipped properly now after the earlier problem?

umbral spindle
#

Yeah

#

And i've refreshed it with f3 + t

austere herald
#

what did you use before to have it show up as your custom texture 🤔 ?

umbral spindle
#

just the actual copy-pastable unicode character

#

austere herald
#

ah, should only be one \, not two, my bad.
/give @s chest[custom_name={"color":"white","text":"\uE0FF\uE101"}]

umbral spindle
#

TYY

#

it worked

#

is this the same for using it in java code

austere herald
#

depends on the "java code"

umbral spindle
austere herald
#

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)

umbral spindle
#

@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

austere herald
#

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

umbral spindle
#

But when I make the height 8px, it makes the texture all blurry and does some weird thing to it

austere herald
#

well, you can only display so many pixels on a limited size

umbral spindle
#

With this size