#JSON-UI General
1 messages · Page 43 of 1
cool, I'm trying to be good at making custom ui and do pixel art stuff like explosions, game ui/hud design
some stuff like that
Can you help me make this work?
make sure you're not using a percentage sizes inside the children elements from the grid...
since it's dynamic, it does not like static "100%" size that much
this isnt just dynamic grid thing but others aswell, like stack panels, label with backgrounds and so on
including button_text_max_size?
if the parent element is using "100%c" which, scales the element size automatically depends how large the children sizes are.
sorry, i don't really have time
you might wanna change it to static sizes.
no i think
as long the button element that has fixed size, you don't have to worry about children elements from that element
since itll follow the parent size as a max size.
the button itself is fixed size 45
still crashing tho
you sure did referenced them right
Okay, thank you for your attention
like, everything not misspell?
i can send the file if that won't take much of your time?
yeah
oh.
yeah that will not work
here
"grid": {
"type": "grid",
"grid_dimensions": [5, 25],
"size": ["100%", "100%c"],
"grid_item_template": "server_form.custom_item_button",
"grid_fill_direction": "horizontal",
"grid_rescaling_type": "horizontal",
"collection_name": "form_buttons",
"bindings": [
{
"binding_name": "#form_button_length",
"binding_name_override": "#maximum_grid_items"
}
]
}```
ah shit, lol
yeah this might be a good change for people but you can change the grid size only to children grid or that button
this means that you can change it's size freely.
JSON-UI supports decimal size/offset value too, well. technically. only something like 0.5
good to know
how to center stack_panel?
"container": {
"type": "stack_panel",
"anchor_from": "center",
"anchor_to": "center",
"orientation": "vertical",
"controls": [
{
"dialogue_text@wooden_dungeon_door.dialogue_text": {}
},
{
"dialogue_buttons_panel@wooden_dungeon_door.dialogue_buttons_panel": {}
}
]
}
use "size": [ "100%c", "100%c" ]
bro is making peak
wdym a game got you asking if you want to enter or not
like bro
am I going to face some fire eating monster
thanks!
lol
the only way to add gap to grid is padding?
yeah
think of it like file list but just parent element and children element.
your button element
- properly adjust size from there so it can acts like padding
>> actual button
- use the fixed size for your button```
dynamic grid only work with panels?
i changed my button to stacked panel to add padding but that crashed my game
i can just make the button smaller than the panel so i don't need a padding
it depends on the actual size of parent button element really.
you make it small, the grid also gets smaller due to dynamic grid.
you make it big, the grid gets bigger. you get the idea.
how to anchor stack_panel 😵💫, it always stays in the middle
@hexed briar you know how to swap a control element using modifications?
docs show only binding example
"element": {
"modifications": [
{
"array_name": "controls",
"operation": "remove",
"control_name": "element_you_want_to_remove"
},
{
"array_name": "controls",
"operation": "insert_front",
"value": [
// Element you want to add.
]
}
]
}```
can value be multiple?
yeah
alr, thanks
{
"array_name": "controls",
"operation": "insert_front",
"value": [
{
"[email protected]_1": {}
},
{
"[email protected]_2": {}
},
{
"[email protected]_3": {}
}
]
}```
{
"namespace": "server_form",
"long_form": {
"modifications": [
{
"array_name": "controls",
"operation": "remove",
"control_name": "long_form@common_dialogs.main_panel_no_buttons"
},
{
"array_name": "controls",
"operation": "insert_front",
"value": [
{
"custom_long_form@common_dialogs.main_panel_no_buttons": {
"$title_panel": "common_dialogs.standard_title_label",
"$title_size": ["100% - 14px", 10],
"size": [225, 200],
"$text_name": "#title_text",
"$title_text_binding_type": "none",
"$child_control": "custom_form_grid.custom_panel_main",
"layer": 2,
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "((#title_text - '§b§l§o§c§k§s§t§a§t§e§r') = #title_text))",
"target_property_name": "#visible"
}
]
}
},
{
"custom_long_form@common_dialogs.main_panel_no_buttons": {
"$title_panel": "common_dialogs.standard_title_label",
"$title_size": ["100% - 14px", 10],
"size": [300, 250],
"$text_name": "#title_text",
"$title_text_binding_type": "none",
"$child_control": "custom_form_grid.custom_panel_main",
"layer": 2,
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "(not ((#title_text - '§b§l§o§c§k§s§t§a§t§e§r') = #title_text))",
"target_property_name": "#visible"
}
]
}
}
]
}
]
}
}```
like this?
yeah should be
wait
remove the @ and the rest after long_form
leave only long_form
in control_name?
alright, thanks for the help
i might be doing something wrong, this doesn't seem to work for me
oh yeah i forgot something.
server form dislikes custom forms for whatever reason.
so no you can't delete long form.
instead you could replace it with the same one but custom entirely.
this worked, but not sure it will not mess with other stuff
can i change the chest screen background image midst the screen open
so if player has the chest open of a custom GUI (e.g all white)
if say, uh, a specific item with a specific name gets added into the chest, the background will change to all black
possible or nah?
e.g smth like this
I think it's just different server forms without the open and close animations
-# doesn't seem like dynamic form to me
it's a chest...
the inventory is right there
server form can be made that way
there's chest ui yk
well... this blew my mind
looks good. however i work with Pocketmine-MP, not scripting. so converting this into PHP
would be a PAIN. perhaps i could work with the Author to make a official plugin version of it for Pocketmine-MP
yeah that's going to be a lot of pain
Isn't there pocketmine plugins that uses server form screen already
i’m not looking for forms, i want chest GUI
chest GUI is a modified server form
{
"test": {
"type": "label",
"text": "#text",
"font_size": "small",
"size": [
98,
16
],
"offset": [
9,
0
],
"text_alignment": "center",
"bindings": [
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#text",
"binding_type": "global"
}
]
}
} im not an expert on bindings i was wondering how can i make the text only the first 50 characters or in between a certain amount of characters of the title
"type": "label",
"text": "#text",
"font_size": "small",
"size": [
98,
16
],
"offset": [
9,
0
],
"text_alignment": "center",
"bindings": [
{
"binding_name": "#hud_title_text_string",
"source_property_name": "('%.8s' * #hud_title_text_string) - ('%.6s' * #hud_title_text_string)",
"binding_name_override": "#text",
"binding_type": "global"
}
]
should it look like this?
If bindings were to easy
figured it out
it seems to not work if the string is only numbers it seems just to take the numbers away so ig ill have to plop an invisible character after every so letters
how can i hide my custom hud if i run /hud @s hide all?
You cannot do that with custom Ui sadly
Is there logically a way then to like hide multiples uis without spamming "hide_" to each one
how can I make my image appear only if the title includes "custom"?
This can be done using some simple conditions
If your title is like update:custom where update: is $update_string
Then you can use (#preserved_text - $update_string = 'custom') as source_property_name to control visibility
If this is not what you're looking for then explain further about what you want
Have you guys seen this new type? tooltip_trigger
https://discord.com/channels/523663022053392405/1396886636159045643
Help me on this problem anyone?
what is the inventory slot texture name? (Excluding the hotbar)
And where is it located
and also minecoins texture , how can I change it
posted to wrong channel (deleted) sorry about that
When manipulating text in 1 UI (Actionbar), is it possible for me to get 1 texture without having the exact number of characters?
Ex:
"$texture": "('%.40s'*$actionbar_text)",
"texture": "('textures/sprites/' + $texture)",
Actionbar: minecraft.sprite
would it be possible for me to get the texture even if I don't have 40 characters in the text?
NVM
,-, bruh
Never tried education edition
What's in the complex systems 👀?
just a testing place, conceptual stuff
Cool stuff
Is it possible to use that custom drop-down to show or hide some other element
Yes
When I tried to do something like that the game stopped taking any input making it impossible to close that drop-down (only hovering was working for drop-down content)
What could be the mistake?
I am not using any dropdown element, just plain toggles
dropdown element is unusable outside vanilla stuff
textures/ui/item_cell.png and item_cell.json
textures/ui/MCoin.png
What is the difference between increment and decrement auto reset and regular?
Auto Reset -> Reset to the first number after the number exceeded the max number
Regular -> Stops the user from exceeding if the number has reached the max number
that's very interesting, i can make looping animation using it.
can you show me the code?
I don't think #looping is a binding, no?
no, i just want to change the image path in the last frame to return to the initial value, i tried multiplying it by 0 it didn't reset the value
I have question related to binding. Currently I've set up binding for buttons so the factory is not reading first 2 buttons. This is set on one interface. But when I try open default form with more than 3 buttons it crash my Minecraft. When I have custom form it allows me to use more buttons. How I can make that in factory I won't see first 2 buttons, but it won't affect rest of my forms?
I'm looking around a few different Discord servers trying to find someone who'd be able to help me out with something, I'm trying to create a Teleport thing for players and a moderation item for the teleport thing for admins, it's meant so players can freely teleport to discovered locations, the locations only appear once you've discovered them, TPL (teleport list) I'm hoping to get to look something kind of like this, what I'm looking is for someone to possibly create a basic template with two of each button or tab so I can learn and add on to it,
And a scroll bar for long list
Since I've been searching on the server to hide specific messages. None covered both so I decided to figure it out. the $trigger_text only affects tellraws while still allowing all player messages that even include the $trigger_text and all tellraw message that don't include $trigger_text.
JsonUI Snippet ^. Not asking for help
One with yellow text contains the trigger text. One message is hidden from a tellraw
Basically, u know how to hide messages without affecting chat and tellraw . Just specific messages??
It only hides tellraw messages that include the specific trigger_text. Everything else is shown
I see
This could be a dev source for those that may need to hide Chat texts and trigger things with it (IG)
Add it to the wiki? ¯_(ツ)_/¯
oh wait I see
Stupid really that is was on one or that changed the outcome
Y e s
Wait, Using "chat_label" in Hud_screen.json doesnt require any root panel???
Oh ok, now the thing is: Try to show images , ill try tomorrow with my lightbulb on
Oof
fixed it.
hello @placid geode , i'm trying to implement custom forms
by "custom forms" i mean forms containing inputs, sliders, toggles.. and submit buttons. i'm not using long_form here
when i create a custom form different from the vanilla custom form (using bindings and #title_text), it displays correctly.
but the default custom form (event without modifying it) doesn't display and crashes the game. i think it is related to the fact that the #visible binding doesn't prevent the creation of multiple submit buttons at the same time, and i believe that's where the problem comes from, but i don't know how to explain how the new custom form (which i display from the title) is shown while following this principle...
any idea how i could create multiple custom forms at the same time and avoid crashing when using the vanilla custom form ? i ping you because it seems complex and you're probably one of the few who can help me
Hello i'm new in json ui
What is the documentation for creating a keyFrame
and also what properties can be added?
https://wiki.bedrock.dev/json-ui/json-ui-intro#animations
It has some examples and the properties are explained here
The animations don't really work like keyframes but you can set what animation to play next by defining the next property like this:
"next": "@<namespace>.<next_anim>"
I saw in vdx rgb gui, it added variables in anims template,
and many operators to set next back to the initial frame,
does it affect performance?
Unless you have too many animations running back to back, you won't see any noticeable performance drop
And yes you can use variables in anims
"event_item": {
"type": "image",
"anchor_from": "right_middle",
"anchor_to": "right_middle",
"size": ["100%c + 10px", "100%c + 5px"],
"offset": "@hud.event_anim",
"texture": "textures/ui/hud_tip_text_background",
"alpha": 0.7,
"bindings": [
{
"binding_type": "view",
"source_property_name": "(#text - '<' - '>')",
"target_property_name": "#text_n"
},
{
"binding_type": "view",
"source_property_name": "(not((#text_n - 'et') = #text_n))",
"target_property_name": "#visible"
},
{
"binding_type": "view",
"source_property_name": "(#text_n - 'et')",
"target_property_name": "#full_text"
},
{
"binding_type": "view",
"source_property_name": "(#full_text - 'fg50' - 'fg0' - 'fg1' - 'fg2' - 'fg3' - 'fg4' - 'fg5' - 'fg6' - 'fg7' - 'fg8' - 'fg9' - 'fg10' - 'fg11' - 'fg12' - 'fg13' - 'fg14' - 'fg15' - 'fg16' - 'fg17' - 'fg18' - 'fg19' - 'fg20' - 'fg30' - 'fg60' - 'fg100')",
"target_property_name": "#image_path"
},
{
"binding_type": "view",
"source_property_name": "((#full_text - #image_path) - 'fg')",
"target_property_name": "#timer_seconds"
}
],
"controls": [
{
"event_image": {
"type": "label",
"anchor_from": "center",
"anchor_to": "center",
"text": "#image_path",
"layer": 31,
"alpha": 1
}
}
]
},
ettextures/btn-br/testfg50
how do I make that it return #image_path = textures/btn-br/test
and for #timer_seconds = 50 bc it doesn't work
try this in event_image control
"text": "#text" and
"bindings": [
{
"binding_type": "view",
"source_control_name": "<name of parent (depends on your code)>",
"source_property_name": "#image_path",
"target_property_name": "#text"
}
]
how can i make my image only appears if my title contains the word 'show:'
source binding name in parent not use source_control_name ?
Oh I forgot to add that lol
is it possible to put live countdown timer in server forms?
I've seen a UTC timestamp translation key thing recently, no idea if it works there too xd
how to fix this armor, when i use effect health boost it becomes like this
you can put inside scroll content
if you want to add the scrollbar
is this possible? for server form ui
without closing and opening the ui
afaik it isn't. Server forms need to be reloaded each time for changes to take effect. You could get around this by having a count down animation but it wouldn't be dynamic
It's a render, you can't change it
The only way is hiding it
Or...
Creating a Dynamic Property called armor_protection and using values and tests to define his value
And mix it with UI
Ohh ok
Try adding this in your armor renderer
"property_bag": { "#use_heart_offset": false }
Don't know if it'll work
It was given by bakedpotato~ in one of the posts here
I tried but it didn't work
The issue is because of offset but I don't know how to fix it
Ohh
It's not a issue
We can't change renders offset in that way
It's like a padding stuff you know
Create a dynamic property called armor_protection, and assign a value to it based on the type of armor being worn. Then, create a texture that visually changes in stages depending on the value of armor_protection. You can use either Minecraft’s default textures or your own custom textures to create a personalized look.
It's hard and boring but it's possible.
yes i am doing it but it is not that difficult
Ok fine
After you finish it can you send it to me? Just a picture.
I would like to see your progress
hey i made virtual armor with title and i also consulted some addons so i was able to do that
No way, it was so fast
Are u a monster?
U just need to finish it now
No, I refer to the addon on there and fix my UI
now i just need to add another script and it's done
Wow, pls keep sending me the results
could you please send it with the hole code bc its doesn't work for me maybe I did something wrong
how do you bind a UI to an entity
I have the UI made i just can't figure out how to make the entity inventory display the UI
How are you supposed to use preserved title texts on an element that changes its visibility? Once its hidden, the preserved title text setup doesnt update unless this
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#preserved_text",
"binding_condition": "visibility_changed"
},
gets turned into
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#preserved_text",
"binding_condition": "always"
},
this causes it to re-appear whenever the text changes again, but the issue is now this doesnt only conditionally update #preserved_text
-# hi freddie
-# hi tom, Ui makes me crazy xD
Yeah the parent visibility also affects the child's visibility which messes the preserving thing
Instead make the panel for preserving (data_control probably) a sibling of your parent element and then use it. You'll need to add "resolve_sibling_scope": true to the bindings of the parent
Send integers in the title and multiply it with a float
I already solved it, thanks anyway.
Oh! awesome thanks!
what's the proper way to render the armor panel with the items without crashing the game?
chest screen ^
You can't
They're only for inventory screen
🥲
make it normal slot and swap between it and the player armor slots using scripting
Is there even a single .md documentation file for Ore UI
I barely touched Json ui and Mojang wants to remove it already ...
is it possible to change slot image if there's an item in it?
you can try checking for the value of #item_id_aux
If I'm not wrong, it will have -1 as its value if there's nothing in that slot
So you can apply that in the conditions
okay, ill try that, thanks!
It's not a working code but it has the explanation of what I was saying there
I already found it out thank you anyway
"root_panel/hud_actionbar_text_area": {
"type": "panel",
"factory": {
"name": "hud_actionbar_text_factory",
"control_ids": {
"hud_actionbar_text": "[email protected]_actionbar_text_123"
}
}
},
"hud_actionbar_text_123": {
"type": "panel",
"controls": [
{
"hud_actionbar_text": {
"type": "image",
"size": [ "100%c + 12px", "100%c + 5px" ],
"offset": [ 0, "50%-68px" ],
"texture": "textures/ui/hud_tip_text_background",
"alpha": "@hud.anim_actionbar_text_background_alpha_out",
"controls": [
{
"actionbar_message_1": {
"type": "label",
"anchor_from": "center",
"anchor_to": "center",
"color": "$tool_tip_text",
"enable_profanity_filter": true,
"layer": 31,
"text": "$actionbar_text",
"$s_text": "$actionbar_text",
"localize": false,
"alpha": "@hud.anim_actionbar_text_alpha_out",
"visible": "($s_text - '§2§4§5§1§2§r') = $s_text"
}
}
]
}
},
{
"actionbar_message_2": {
"type": "label",
"anchor_from": "center",
"anchor_to": "center",
"color": "$tool_tip_text",
"enable_profanity_filter": true,
"layer": 31,
"text": "$actionbar_text",
"$s_text": "$actionbar_text",
"localize": false,
"alpha": "@hud.anim_actionbar_text_alpha_out",
"visible": "(not (($s_text - '§2§4§5§1§2§r') = $s_text))"
}
}
]
}
i made this but the background of actionbar_message_2 is still there
Is it possible to change where the mob effect icons on the right of the screen are located? I found the code for the effects panel (when you press z), but im not sure about these
ive been looking, i haven't found it yet
i tried doing ctrl + f find "hud_mob_effect_background" in there because that's the texture it pulls, and it wasn't used
(I set mine to an empty texture which is why it's not behind the effect icons)
"mob_effects_renderer" in hud_screen.json
Ooo, ok!!! Tysm!
hey uhh a bit of silly question, can you use json-ui in marketplace add-ons?
no
in live_horse_renderer is there any way I can make the model rotate towards the cursor?
world templates only. and even then its limited
how so?
Something something vanilla. i dont remember the details but not everything is allowed
yeah they have a certain limits. but NPC screen and HUD screen is pretty much fine if i recall.
How can I show two images at the same time?
"test": {
"type": "image",
"texture": "textures/items/diamond",
"layer": 70,
"size": [88, 88],
"offset": [0, 2],
"anchor_from": "center",
"anchor_to": "center",
"alpha": "@hud.anim_test_alpha_in",
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_type": "view",
"source_property_name": "(#hud_title_text_string = 'test')",
"target_property_name": "#visible"
}
]
}```
???
Use panel first and add both images as to separate children defined inside the controls array of the panel
I tried this, but it didn't work
"test_1": {
"type": "panel",
"controls": [
{ "[email protected]_1_ic": {} },
{ "[email protected]_2_ic": {} }
],
"bindings": [
{ "binding_name": "#hud_title_text_string" },
{
"binding_type": "view",
"source_property_name": "(#hud_title_text_string = 'test_1')",
"target_property_name": "#visible"
}
]
},
Just to confirm, you properly defined the image objects within hud_screen.json right?
Yes
The issue may be with the binding, can you try commenting it?
"test_1": {
"type": "panel",
"controls": [
{ "[email protected]_1_ic": {} },
{ "[email protected]_2_ic": {} }
],
"bindings": [
{ "binding_name": "#hud_title_text_string" },
{
"binding_type": "view",
"source_property_name": "(#hud_title_text_string = 'test_1')",
"target_property_name": "#visible"
}
]
},
"test_1_ic": {
"type": "image",
"texture": "textures/items/diamond",
"layer": 70,
"size": [88, 88],
"offset": [0, 2],
"anchor_from": "center",
"anchor_to": "center",
"alpha": "@hud.anim_test_1_alpha_in"
},
"test_2_ic": {
"type": "image",
"texture": "textures/items/diamond_axe",
"layer": 70,
"size": [88, 88],
"offset": [0, 2],
"anchor_from": "center",
"anchor_to": "center",
"alpha": "@hud.anim_test_1_alpha_in"
},
And how will the two images appear?
Wait don't you have test_1 added somewhere in the root_panel or sth?
By default, any component you define is 'visible' all the time
"root_panel": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_front",
"value": {
"test_1_factory": {
"type": "panel",
"factory": {
"name": "hud_title_text_factory",
"control_ids": {
"hud_title_text": "[email protected]_1"
}
}
}
}
},
Okay so by default, the images should be visible without any binding
Try to comment bindings array from here and it should show the 2 images
Okay
Yes, but through the title command
No
So you should use title preservation
I don't suggest doing it this way, specially since the document didn't recommend this method
It recommended to use this instead
Thanks, i will try
When will oreUI get added ;-;
already is added
I think he means when they will make everythingn ore ui
Btw they will still keep json ui support right?
how to move the position of chat message to bottom left?
You can try inserting a panel before the panel for chat messages that'll have size [0, "fill"]
Or remove the chat messages panel from chat_stack and add it to the root_panel directly
btw is it the chat_panel inside hud_screen?
Yeah
In root_panel/chat_stack
-# I misread it the first time
thanks!
oh hey, can you provide me the code to do that?
just want to know the full code of how you moved the chat in bottom
later, im not at home rn
You can checkout a java UI tpack
"root_panel/chat_stack": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_before",
"control_name": "chat_panel",
"value": [
{
"spacer": {
"type": "panel",
"size": [0, "fill"]
}
}
]
}
]
}
as simple as that
i use the chat_panel
"chat_panel": {
"type": "panel",
//Uncomment when text formatting is being accounted for in word length
//"clips_children": true,
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"size": [
"100%",
"fill"
],
"max_size": [
"100%",
"70%"
],
"controls": [
{
"stack_panel": {
"type": "stack_panel",
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"factory": {
"name": "chat_item_factory",
"max_children_size": 10,
"control_ids": {
"chat_item": "[email protected]_grid_item"
}
}
}
}
]
}
max_children_size this thing controls how many chat messages are visible
@sinful crypt
Thanks
What's with the "clips_chlidren" being commented?
idk, its from the default chat_panel code
ah
i would need it to aligned with bottom, the img shows its a bit up
set this to 100% to align it to the bottom of screen OR use Echo's code
if you want to change the font size, add this
"chat_label": {
"font_scale_factor": 0.7
}
does that value make font smaller than default?
1 is the default size
so 0.7 makes it smaller
you can also make it bigger if you want xD

-# my grandpa's phone font size
dont mind but im stupid at json ui, would putting that whole code can work?
@manic dragon
can u tell
yeah why not
ah i thought i'd need to put in vanilla UI file
wait what do you mean by putting whole code
uh i liked the joshua's method more
i meant in my debug screen file, i'd put that in a {} in top of all my code? @manic dragon
no just paste it as-is
and add a comma at the end depending on where you put it
{
"chat_panel": {
"type": "panel",
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
//
"chat_label": {
"font_scale_factor": 0.7
}
//
Do i add that here?
@manic dragon srry but that myb the last question i ask
{
"namespace": "hud",
"chat_panel": {
"type": "panel",
//Uncomment when text formatting is being accounted for in word length
//"clips_children": true,
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"size": [
"100%",
"fill"
],
"max_size": [
"100%",
"75%"
],
"controls": [
{
"stack_panel": {
"type": "stack_panel",
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"factory": {
"name": "chat_item_factory",
"max_children_size": 10,
"control_ids": {
"chat_item": "[email protected]_grid_item"
}
}
}
}
]
},
"chat_label": {
"font_scale_factor": 0.7
}
}
thx
yep that's different element. so this way
ive been trying to add a factor for the animation on the json ive been working on so the animations for attack only play when they are in range of the target but for some reason after trying all the ones i could fine: in_range,varible.attack_time,query.facing_target_to_ranged_attack i havent gotten one to work and i dont know the issue
This is NOT Json Ui
But that's what it says?
Not every json file is JSON UI
The ones that control the parts of the actual user interface you see are JSON UI files. Located in the ui folder
Well where do I go for this specific problem
Probably in #1067869022273667152
Ah ok thank you
Is it possible to use chat messages to preserve its value and display labels instead of titles or actionbars?
yes
use #chat_text
I noticed that for some reason #text has the content of #chat_text without any modification from my part which is confusing
{
"label": {
"type": "label",
"text": "#text",
"text_alignment": "left",
"bindings": [
{
"binding_type": "view",
"source_control_name": "data_control",
"source_property_name": "(#preserved_text - 'test')",
"target_property_name": "#text"
}
],
"controls": [
{
"data_control": {
"type": "panel",
"size": [
0,
0
],
"bindings": [
{
"binding_type": "collection",
"binding_collection_name": "chat_text_grid",
"binding_name": "#chat_text"
},
{
"binding_name": "#chat_text",
"binding_name_override": "#preserved_text",
"binding_condition": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#chat_text = #preserved_text) and (('%.4s' * #chat_text) = 'test'))",
"target_property_name": "#visible"
}
]
}
}
]
}
}
this literally show the entire message
Change "#text" to any other variable like "#text_for_label"
Did that, but nothing.
how can i make an actionbar text resize and offset based on the text?
like i want it to be always at the bottom right even if the text is more
The issue with preserving chat messages is that they are generated as a new control of the chat factory each time and their value is not usable outside the control (at least that's what I've seen)
The closest I got to displaying labels through chat was by using destroy animation and max_children_size of the factory. But that has its own major flaws.
In addition: using chat messages will not work properly and theres no way to do it work properly atm
Nobody did something like that, or someone did but by obvious reasons, they dont wanna share
So what do you mean by not working properly here
Is it about using it in conditions?
By using it in conditions I meant raw text can be easily used in bindings and string operations are easily doable on it but regular chat messages are a bit different.
But there's a way to fix that and I used it in the loading animation template that I made.
Oh i see
what's the texture name of the buttons specially the buttons for server form?
textures/ui/button_borderless_light
...lighthover
...lightpressed
They are used almost everywhere you see white buttons, toggles or drop-downs
ahhh i see, thank you!
Oh i see
You said it again :)
I'm very repetitive because I dunno what to say, sorry
No worries
devlog
How do you change the color of the bar?
I have the same problem , te molestas si hablo en español? Jeje , hace rato lo intente y no pude , me di cuenta q por alguna razón eso no funcionaba, te recomiendo tener una fabrica del chat , y en otro archivo llamar al elemento , este elemento q te recomiendo sea un panel , en ese panel trata de poner tus bindings , pero con la condición "once" debería funcionar... Y en los controles pon el texto
abc... and ^ are both inside the stack_panel, how can i center the ^ (label element)?
Cool
May I ask what the process is?
Make both their width the same and text_alignment center in the label for ^
Huh?
I mean how you made the animation
It depends on some value right and doesn't go from full to empty every time
-# sorry for asking so much
Make a variable and change it value depending on the mobile binding
uhh how to do that depending on the mobile binding...
Isn't there a different controller for mobile in hud_screen?
a different root_panel for pocket?
I think it was a binding called touch_only or sth that has the word touch in it
You can search for that binding in hud_screen
"offset": "$offset",
"$offset|default": [0, 0], //default offset
"variables": [
{
"requires": "$touch",
"$offset": [0, 0] //offset for mobile
}
]
you can try it like this
thanks you!!
np
finally :))
im currently trying to make hp, and mana bar, how can i change the size of the texture of bar that will fill the empty bar using title?
like if title is
update:mana:currentValue/maxValue
currentValue = 80
maxValue = 100, then the image size will be 80% width or something
you're looking for this
Code: https://github.com/LeGend077/json-ui-resources/blob/main/custom_progress_bar.json
Preserve Title Text: https://wiki.bedrock.dev/json-ui/preserve-title-texts.html
Music:
Sweden, Minecraft - C418
#minecraftbedrock
I did used this but the bar stayed empty
looked into the comments and the guy said the script is outdated
ahhhhhh i cant add a custom one(mana)
If you pass the value in title correctly it should work
It doesn't matter which approach you're taking in the script
huh so this can be used without script?
to convert string to int i just need to multiply it to a number like 1, right?
Commands?
well never tried using them, what example command should put in?
Idk, I don't use commands as well
But for testing you can use title command with the right format that you're using in your UI file
Yep
oh well, thought the whole thing would be automatic by what hp your having
how can i pass it to a variable?
"source_property_name": "((#preserved_text - $update_string) * 1)", this thing
"target_property_name": "#some_property" and assign it to variable like this "$a": "#some_property"
But, I can't guarantee if it'll work. If it doesn't, then use the property through bindings and not variables
Can control color with bindings?
how can i get the max health of player so i dont need to manually set the $max_health?
"$update_string": "update:hp:",
"type": "image",
"size": [
"100%",
"100%"
],
"layer": 1,
"$max_health": 20.0,
"clip_direction": "left",
"clip_pixelperfect": false,
"texture": "textures/ui/bar/full_hp_bar",
"bindings": [
{
"binding_type": "view",
"source_control_name": "health_data_control",
"source_property_name": "((#preserved_text - $update_string) * 1)",
"target_property_name": "#health"
},
{
"binding_type": "view",
"source_property_name": "(($max_health - #health) / $max_health)",
"target_property_name": "#clip_ratio"
}
]
Do a formula in your script, cuz idrk if theres a way to do it but In UI
He formula was something like:
(health.currentValue * 100)/health.maxValue or something like that
i thought making a custom bar would be easy @.@
It is not
Only if the bossbar trick was working
thought it will be funny if I gave player the bossbar's, but it was bug where the bar doesn't move just stays full
it was almost perfect
What does the code to a custom button look like?
am I crazy or did they just remove the '%.1s' part from documentation? I mean from wiki.bedrock.dev??
They revamped it
totally makes sense to put it in intro...
I just download this whole piece of crap
just to search for %. because I couldnt find it on that site bruh
(literally)
and guess, I found it here immediately
#hatemarkdown
or maybe there is fix for it that I dont know
whatever...
I don't know if it was a Minecraft problem, but why when I use my custom forms for a long time, open and close it so many times, my game crashes? It's a forms problem or maybe a custom bar problem?
is it possible to render other players skin in live player renderer?
Well it's possible but not with live player renderer
You'll have to use live_horse_renderer and entity id of the player
how can i set the entity id?
Through bindings
And to get entity id you'll need script. Both are easy tasks
where i can see all the available list for binding_name?
Made by inevitable
thanks!
The list is huge
uhh am i doing it correctly? also is this gonna work in server form?
"render": {
"type": "custom",
"renderer": "live_horse_renderer",
"layer": 20,
"anchor_from": "center",
"anchor_to": "center",
"bindings": [
{
"binding_name": "#entity_id"
}
]
}
Almost
But you'll need to pass the entity id of the player to this #entity_id binding
It works in server form
what's the example value for entity_id? i tried passing the #title_text value to #entity_id minecraft:player but it still not showing
nvm finallllllllly!!
oh so each player has their owm unique entity id
Yep it's a number and unique for each entity
why its not showing title2?
"container": {
"type": "stack_panel",
"orientation": "vertical",
"controls": [
{
"title1": {
"type": "label",
"text": "#title_text",
"layer": 20,
"anchor_from": "center",
"anchor_to": "center",
"bindings": [
{
"binding_name": "#title_text"
}
]
}
},
{
"title2": {
"type": "label",
"text": "#title_text",
"layer": 20,
"anchor_from": "center",
"anchor_to": "center",
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "('%.10s' * #title_text)",
"target_property_name": "#title_text"
}
]
}
},
{
"test": {
"type": "label",
"text": "working",
"layer": 20,
"anchor_from": "center",
"anchor_to": "center",
"bindings": [
{
"binding_name": "#title_text"
}
]
}
}
]
}
u cant use string formatting on numbers
ohh
how can i make it only show the numbers...
A quick question
Is there a way to generate random numbers through bindings
Which one are you talking about
this, i only want to get the numbers(entity.id) and pass it to my (#entity_id)
its server form title
Are you using body text for something else
Cause if not, you can use that for passing entity id
Or you can do something like this
First 50 characters for title and after that the entity id
yes, im using it to display player data, im trying to add the renderer to the red box
so its like adding a number at the start of the text make it considered as an int/number instead of a string??
I meant having the string at the beginning and then the number for entity id
Using number at the beginning may cause more issue
So you can do (#title_text - ('%.50s' * #title_text)) in source_property_name
And this will give you the entity id that's at the end
😵💫
1st: #title_text
2nd: ('%.50s' * #title_text - '\t')
3rd(your sample): (#title_text - ('%.50s' * #title_text))
numbers aren't directly visible in labels
add a string in the front to see if it's working
I think it's working
uhh after i add 'a' ('a' + #title_text - ('%.50s' * #title_text)), it makes my game lag...
code of ths json ui?
just the bindings of this part
"container": {
"type": "stack_panel",
"orientation": "vertical",
"controls": [
{
"title1": {
"type": "label",
"text": "#title_text",
"layer": 20,
"anchor_from": "center",
"anchor_to": "center",
"bindings": [
{
"binding_name": "#title_text"
}
]
}
},
{
"title2": {
"type": "label",
"text": "#title_text",
"layer": 20,
"anchor_from": "center",
"anchor_to": "center",
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "('%.50s' * #title_text - '\t')",
"target_property_name": "#title_text"
}
]
}
},
{
"title3": {
"type": "label",
"text": "#title_text",
"layer": 20,
"anchor_from": "center",
"anchor_to": "center",
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "('a' + #title_text - ('%.50s' * #title_text))",
"target_property_name": "#title_text"
}
]
}
}
]
}
yep you made a loop here, which is causing the lag
which part?
"title3": {
"type": "label",
"text": "#text",
"layer": 20,
"anchor_from": "center",
"anchor_to": "center",
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "('a' + #title_text - ('%.50s' * #title_text))",
"target_property_name": "#text"
}
]
}
AHHHHHHHHHHHHHH FINALLY, THANK YOU!!!!!
weird, why its still not working in live_horse_renderer :/
{
"entity_model": {
"type": "panel",
"size": [
50,
50
],
"controls": [
{
"render": {
"type": "custom",
"renderer": "live_horse_renderer",
"layer": 20,
"anchor_from": "center",
"anchor_to": "center",
"property_bag": {
"#id": "-1464583847935"
},
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "#id",
"target_property_name": "#entity_id"
}
]
}
}
]
}
}
it only works if i enter the id manually
😂
ngl, i should've told you earlier, im sorry
you cant do that, #entity_id only takes strings, not number
when u string format that, it turns it to number
i tried with and without '§z' it still didnt work, i also tried passing it to property bag with string value like "#id": "" but it still didnt work 🥲
{
"test": {
"type": "panel",
"size": [
50,
50
],
"controls": [
{
"render": {
"type": "custom",
"renderer": "live_horse_renderer",
"layer": 20,
"anchor_from": "center",
"anchor_to": "center",
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "('§z' + #title_text - ('%.50s' * #title_text))",
"target_property_name": "#entity_id"
}
]
}
}
]
}
}
seriously, i didn't know that :')
I thought that was common knowledge lol. json ui ain't hard 🙏
yeah, i noticed that earlier when I tried removing the quotes from the id property
"property_bag": {
"#id": "-1464583847935"
}
result of never trying it myself properly
Ight
is there any other way to do this?
What you trying to do
i want to display the renderer here
ig you can try doing this from button text instead
Do paper_doll_renderer or live_player_renderer not work in forms?
I have never messed with forms
im trying to display other player's skin
I'd personally use molang for that
i did it :))))
what did you do
i use the .label to store the entity id
and use collection index to get the label text value
yea that makes sense
weird, why other entity display is a bit higher than player :/
String formating is very confusing
I use %.6s * '123abcd'
only display 123 not 123abc
I had to add §r and remove it again, it doesn't affect the display but for specific data it's a pain
I know because I have been fighting with it idk 1 year ago for sure
How many lines of code is a custom button?
probably normal tbh, the moment the JSON-UI detects number first before the word, it'll automatically converts it into a value immediately.
label does not display value unless are converted to string.
but sometimes, a certain screen may have some weird hidden symbols that will make string formatting not so reliable until you find the initial point where it works as intended.
anyone know how to show the player name in a label element in hud_screen.json ?
use preserve title text and script ig?? get player name and add it to the onScreenDisplay.setTitle
Use #gamertag binding
That's a better way
"player_name": {
"type": "label",
"anchor_from": "top_left",
"anchor_to": "top_left",
"text": "#gamertag",
"shadow": true,
"font_type": "MinecraftTen",
"size": ["default", 12],
"offset": [ 54, 4],
"bindings": [
{
"binding_name": "#gamertag"
}
]
},
like this @undone marsh ??
You also need the collection
"player_name": {
"type": "label",
"anchor_from": "top_left",
"anchor_to": "top_left",
"text": "#gamertag",
"shadow": true,
"font_type": "MinecraftTen",
"size": ["default", 12],
"offset": [ 54, 4],
"bindings": [
{
"binding_name": "#gamertag",
"binding_type": "collection",
"binding_collection_name": "players_collection"
}
]
},
it crashed
Oh wait you need a grid as well I forgot
Yeah it crashes the game without a grid
"a_grid": {
"type": "grid",
"size": [100, 100],
"grid_dimensions": [1, 1],
"grid_item_template": "hud.<name_of_gamertag_label_element>",
"collection_name": "players_collection"
}
This should work
Yup, i was about to send the code in a file.
Ig that would be better
Well I deleted the file now... Since yk you sent it
It was just a stripped down version of my player list pack
But why is the grid so important that it straight up crashes the game
Does anyone have the code of a custom Button? Or a tutorial link?
Just use one of the button layouts from ui_template_buttons.json
You can modify textures and content etc
Where can i find that file? In the sample?
Yep
I will have a look ty 😁
There's a lot of buttons in that file
But I think light_text_button or light_content_button is enough
Yeah i only need a single custom Button, do you know what the buttons on the hud-screen.json are called in the files?
Which buttons are you talking about?
They are all over the file
Like a button that has one texture while its unpressed then changes textures on pressed
Sorry i'm a bit of a beginner 😅
I don't know which one you're talking about
The UI doesn't treat #gamertag as a single variable. This binding:
"bindings": [
{
"binding_name": "#gamertag",
"binding_type": "collection",
"binding_collection_name": "players_collection"
}
]
tells the game to pull #gamertag from the current item in players_collection.
Why it crashes without a grid:
If you put the label outside a collection (like a grid or list), there's no current item context. The game doesn't know which #gamertag to use, so it crashes due to a missing reference.
(I used ChatGPT for better English)
Is there a custom button that works like the jump button ingame?
Those are hardcoded
Ah dang 💔
Ah I understand now
Thanks!
Random question but are you Bangladeshi by any chance since your name sounds like my Bangladeshi friend's
Is a fully custom title bar also a hardcoded feature?
Yep I'm from Bangladesh
Title bar?
You mean title text?
Yeah like uhm /title @a newtitle Testing
No not hardcoded
Great! Do you know of any tutorials possibly?
What do you intend to do?
Damn
Similar to the achievementws but i want to trigger a bar across the top of my screen thats says a text based on what triggered the title bar
https://discord.com/channels/523663022053392405/1336971159496822784
This might help. It uses chat messages instead of title
I want it to appear from the center of my screen though like how a title bar does except higher up on the screen
I can try make an example
How did you guess tho :)
This isn't my actual name just a username generated from random website
Like this, very similar to the title bar but higher up alittle animation some text based on something specifc then it goes
Then it'll be easier to just modify the current title animation
ya_rifat is similar to my friend Rifat Bari
I see
Idk if Flarial Client says something to you but he created it
Damn I don't use that but that's impressive
How big can i make a custom glyph or emoji?
Also hey fun fact, forgot to tel you, but the famous creator of Flarial Client is from Bangladesh too :>
Yeah I just learned from him
I didn't know before
@undone marsh it still crash i think i done something wrong but idk what ; -;
I've been learning json ui for the past few weeks, but I'm using the asaJS library, which makes it very easy to create json ui
String formatting is actually quite easy with this library, but only in binding.
just fixed the bug ***
what's that asaJS library?
How can I remove this "x" where the form closes?
How do i make a server form?
dm me!
I might need this for my future project. Still don't understand how the horse renderer works 😅
Oh yeah, can I use text slice to seperate text from a new line?
uh, if you find that useful then go for it, personally I use plain jsonUI because more than half things I just oneshost without testing so yea
also to text formatting, there arent much useful options so yeah
up to you
Ah thanks
uhh how can i make the clip_ratio works?
"$update_string": "update:rpg:mana:",
"type": "image",
"size": [
"100%",
"100%"
],
"layer": 1,
"clip_direction": "left",
"clip_pixelperfect": false,
"texture": "textures/ui/bar/full_mana_bar",
"bindings": [
{
"binding_type": "view",
"source_property_name": "(((#preserved_text - ('%.50s' * #preserved_text)) - ('%.50s' * #preserved_text - '\t' - $update_string)) / ((#preserved_text - ('%.50s' * #preserved_text)))",
"target_property_name": "#clip_ratio"
}
]
What's the format of your title
There's no source_control_name here
So that might be the issue
Try using proper source_control_name
ohh yeah, wait ill try that
Also #clip_ratio is a float
So multiply the numerator and denominator with a float like 1.0
hmm still not working
the text is separate element
{
"binding_type": "view",
"source_control_name": "mana_data_control",
"source_property_name": "(((#preserved_text - ('%.50s' * #preserved_text)) - ('%.50s' * #preserved_text - '\t' - $update_string) * 1.0) / ((#preserved_text - ('%.50s' * #preserved_text)) * 1.0)",
"target_property_name": "#clip_ratio"
}
the full bar texture is showing when there's no title, but when i show the title, it disappears
nvm its working now :)))
{
"binding_type": "view",
"source_control_name": "mana_data_control",
"source_property_name": "((#preserved_text - $update_string) * $one)",
"target_property_name": "#value"
},
{
"binding_type": "view",
"source_control_name": "mana_data_control",
"source_property_name": "((#preserved_text - ('%.50s' * #preserved_text)) * $one)",
"target_property_name": "#max_value"
},
{
"binding_type": "view",
"source_property_name": "((#max_value - #value) / #max_value)",
"target_property_name": "#clip_ratio"
}
yup
i store the max and current value to property bag
and use it in source property for clip ratio
It's also clean this way
im starting to like using property bag now
is there any limitation for property bag?
I don't really know about any limitations
how to change the position of this item name?
"item_name_text": {
"offset": [0, 0],
"bindings": []
},
adjust the offset
thanks!
how to prevent this
whats wrong with this image
cant you change the text size?
"$button_font_size": "large"
did work tho, that why i am confused
It will, but it didn't
ig the button wrapper does not have $font_scale_factor
i checked
it does
actually let me confirm it work or not
nvm, it was
"$button_font_scale_factor|default": 1.0,
is there a way to send a text using a script and display it in the inventory?
pls someone give me emoji like left image😢😢😢
@gaunt apex
i need more
U can do it by ur self
how do i fix this? when the texture is full size (100/100), it looks fine, but when the clip_ratio is changed (50/100), the texture scales up a bit?
That's so weird 🤔
Is it okay if you send your json code?
should i just separate the empty and full bar into a background, set a fixed size for the empty bar, and place the full bar inside it with its size set to 100%?
nvm, same result
i know now the problem 💀
i thought setting the size to texture size will fix it 😵💫
(i remove the binding and control because of text limit)
"mana_bar_empty": {
"$update_string": "update:rpg:mana:",
"type": "image",
"texture": "textures/ui/bar/mana/empty_mana_bar",
"size": [
84,
8
],
"offset": [
45,
-37.5
],
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"layer": 0,
"controls": [
{
"mana_progress": {
"$update_string": "update:rpg:mana:",
"type": "image",
"size": [
"100%",
"100%"
],
"layer": 1,
"clip_direction": "right",
"clip_pixelperfect": false,
"texture": "textures/ui/bar/mana/full_mana_bar",
"$one": 1.0,
"property_bag": {
"#maxMana": 0.0,
"#currentMana": 0.0
}
}
}
]
}
Nioceee
That's really weird
What if clip ratio is only applied on the image itself
But the bar you put inside a panel?
well well well
Didn't quite understand what you meant
btw where i can get the default font texture??
Nvm I misunderstood sth
where is it located?
in the font folder
hmm why its not included in samples
oh yeah i forgot it's not in the samples
i got it from extracting minecraft
i can give you the zip file of that folder if you want
sure
the file size was too big to upload here
thanks!!
Mind sharing the code? Or at least the parent element and it size
that's my code for the bar, i separated it from the background
"shield": {
"type": "stack_panel",
"orientation": "horizontal",
"size": ["100%c", "100%c"],
"controls": [
// ...
{
"[email protected]_shield": {}
},
{
"[email protected]_shield": {}
},
{
"[email protected]_shield": {}
},
{
"[email protected]_shield": {}
},
{
"[email protected]": {}
}
]
}
"label": {
"$prefix": "!shield_health:",
"type": "label",
"text": "#shield_health",
"color": [0, 0.71, 0.92],
"layer": 3,
"size": [20, 10],
"icon": {
"$prefix": "!shield_type:",
"type": "image",
"texture": "('textures/ui/stats/shield/' + $id)",
"size": [16, 11],
}
Why is the number over the chestplate and not on the right side of it?
FYI wooden_shield extends icon
Man I am 🤏 this close to NOT EVER USING stack panels every again and just positions everything manually lol
is it 8x8 per letter?
Yes
I have question about closing server forms. Is there any possibility to add to JSON thing that if player opens it, it will automaticly close after 3 seconds?
Maybe animations? idk if it can destroy forms without crashing tho
I would like to remove interaction on chalkboards. I managed to get rid of text and locked button, but the best would be to completly remove interaction with it. I'm looking for ideas how to deal with it
omg xD
oh when using a texture with NineSlice, it's working fine, but when using a custom texture like that(normal texture), it has that kind of problem
normal texture work fine for me
can i send you the file and take a look at the problem?
sure
is it possible to set the hover text to fixed position?
No, hover text renderer is a hardcoded thing, it'll follow the cursor
is there a way show server form label if i hover to a specific button?
Well, you can make a text show up when you hover a button and the value of that text can be fetched from form_button_text
But I'm not sure about another server form label
Like this
How can I do this with custom form?
And it can be splitted with the body of it?
I didn't understand sorry
I mean , take the text of the body/split it and place it in the thingi when showing the label when hoverimg the button
Something like changing texts depending the body text
In the picture I was showing the form_button_text not the body text
i'm planning to create something like this for my shop form. i want to display the item description in the text here area.
my current idea is to use a format like button text\t(x20) item description but at the moment i have no idea how to display the text there.
Can't think of any way
hmmm how do you show the text when the user hovers over the button?
I just added this label element to the hover control of the button
But the position of this label is relative to button position
Oh i see anyways how can i do this ? 🤔
ahh i see, ill try that
Like this @unreal ravine
Ill try this later, thanks dud
thanks!
Wrong channel
Huh, thought this would of been right because theres requirements for dependencies and manifests for scripts and stuff
guys
if i add 480 images to the screen (only 10 will have texture, the rest wont)
will it be laggy or not?
I add 16k lines to hud, if correctly done you will only have some delay at opening, but wont have performance issues later or during playing
however 480 images might be bigger than that lmao
this thing:
"hydration_bar_renderer":{
"type":"stack_panel",
"orientation":"horizontal",
"size":["default",9],
"controls":[
{"[email protected]_bar":{"$hydration_value":20}},
{"[email protected]_bar":{"$hydration_value":18}},
{"[email protected]_bar":{"$hydration_value":16}},
{"[email protected]_bar":{"$hydration_value":14}},
{"[email protected]_bar":{"$hydration_value":12}},
{"[email protected]_bar":{"$hydration_value":10}},
{"[email protected]_bar":{"$hydration_value":8}},
{"[email protected]_bar":{"$hydration_value":6}},
{"[email protected]_bar":{"$hydration_value":4}},
{"[email protected]_bar":{"$hydration_value":2}}
]
},
```adds 10 elements to the screen as a progress bar, each element contains two images so thats a total of 20 images
i am rendering the same renderer 3 times (centered_gui_elements_at_bottom_middle and centered_gui_elements_at_bottom_middle_touch and not_centered_gui_elements)
thats a total of 60 images, right?
like all of them are in the screen, but just not visible
its incredibly not efficient
do i have to use one image and keep changing its texture using titles?
use 1 image and use whatever
its a progress bar, works similarly to the hunger bar, if i want to make it animated (each bar is shaking just like the vanilla hunegr bar) how am i going to do that?
yes i can use one image and keep changing its texture / filling quantity using titles, it will be way efficient but also limited at some point
ill try it anyway
how can i make my image texture stretch?
Either use keep_ratio: false
Or fill: true
i think i know the problem of my custom bar now
What was the problem?
yup, i knew it. if the size of the image is 100%, it's showing the actual size of the texture (not stretching the texture), and if it's below 100% or something, it's stretching it to fit the size of the parent
perfect 
Is the green bar for exp or something else
Oh so it's not showing actual exp but a different quantity
yeah
average mojang json ui
how is this binding_name even valid
that's the main reason why it triggers a lot of content log errors once i re-override $option_tooltip_text_binding_name to default
I've seen this kind of binding names in other files too
Idk what they were thinking
maybe they don't care about json ui anymore and pushing promotions even harder
so i angrily patched that skill issue
(same as subpanel_02 but reversed)
but not needed because the game acts that as "not an error"
So they were using ignored and visibility binding at the same time
Was that even necessary :)
just use either completely verbose more bindings or property_bag. as this can create custom bindings from only variables
Custom bindings from variables?
I didn't understand that
it's something like this:
"$var": "some value",
"property_bag": {
"#bind": "$var"
},
and use that binding as normal
Oh I see
So it was using property bag
I thought the variable somehow makes up a binding lol
-# that was stupid of me
is there a way to make background blur effect?
Unfortunately no
ore ui yes, but only ui elements, not background
what's even more funny is
Vanilla's UI are pretty much HARDCORED to not display any errors.
create blur texture
if you want to target certain elements use clips children,
but it's hard to fit them with the main background
how would he create the blur texture?
Oh you mean for UI elements?
that explains
yeah, it was during me trying to modify vanilla's pause screen. LITERALLY EXACT SAME FILE FROM THE SAME VERSION, just small offset adjusts and it's threw me alot of content log errors that is related to bindings and few.
Knew something was wrong so i tried multiple tests by doing exact same thing but different screens, same issue.
turned out regardless if vanilla UI has errors or not, the game refuses to show it. literally just straight out ignoring it.
even if you did the funny thing aka modifying vanilla UI inside the game's files, it would not show content log error either.
Is there any way to get the chat text (chat_screen.json) in bindings?
I want to display something in each chat message if the text contains an specific text
But just #text doesn't work
Theres Not a estable way to do that
I mean , there is but it doesnt work 100% Efficiently
make changes in chat_label , probably add things there as controls
chat_label doesn't exist in chat_screen.json
How does it work?
oh in chat screen it's messages_text
I tried declaring another property with```json
{
"binding_type": "view",
"source_property_name": "#text",
"target_property_name": "#text_2"
}
But its just an empty text
these #text bindings are only available in the content generated by the factory
and afaik cannot be used outside
I'm still trying to use it inside the messages_text, but the bindings are not able to use it
This is what I'm doing
"bindings": [
{
"binding_type": "view",
"source_property_name": "(not ((#text - '§e§x§a§m§p§l§e') = #text))",
"target_property_name": "#visible"
}
]
use it inside a child of messages text, it'll work
or use source_control_name to get #text from it's child text
I'm gonna try
are you using rawtext or normal messages
this should work for rawtext
add a '§r' at the beginning and it'll work for any text (I hope)
Normal
Now I did this to test but the text from #text2 is empty
This should be supposed to show the text twice
you don't need source_control_name here
Without it its still empty
Wait
I forgot to do Ctrl + S
Let me test something
actually to just show #text you don't even need bindings, just typing text: #text will work
Yes but I was trying to modify the text to remove the first 30 characters bc that part is gonna contain info for another element
then use the necessary bindings, it should work
Now the text is completely empty here
(('§r' + #text) - ('%.33s' * ('§r' + #text))) if that doesn't work
I was wondering why almost every character from the original text was still part of the text after the first 30 characters
The player's name is also part of the text
I'm gonna try adjusting the script for that
this one works @hollow needle
§ counts as 2 characters
np
im still confuse using stack panel 😵💫, how can i make it like this?
{
"container": {
"type": "stack_panel",
"size": "$button_size",
"orientation": "horizontal",
"anchor_from": "center",
"anchor_to": "center",
"controls": [
{
"image": {
"type": "image",
"layer": 10,
"size": "$icon_size",
"bindings": [
//binding
]
}
},
{
"text": {
"type": "label",
"text": "#form_button_text",
"shadow": true,
"layer": 10,
"color": [
1,
1,
1
],
"anchor_from": "bottom_middle",
"bindings": [
//binding
]
}
}
]
}
}
i tried using offset but nothings happening
anchor_from/to and offset do not work inside an stack_panel, you must put it inside a panel
Put the entire stack_panel inside the panel
So you don't lose the stack_panel properties
What I do is adding "max_size": [ "100%", "100%c" ]
Do you happen to know how to turn an int into an string?
I think the live_horse_renderer doesn't accept int, but when I parse the text in the binding it turns into an int
"$border_visible": false,
I think so
thanks!
If I know anything I can help you with, I'm really not good at json ui.
yes live_horse_renderer takes int in string format (I recently learned about this)
but I don't know any way to convert int to string, I mean adding the int with a string would normally turn it into a string but that won't help in this case. So, do it with something that doesn't require string formatting
im currently using this, how can i control the size of the texture? i want to add keep_ratio to stretch the texture
"$hover_button_texture"
"$default_button_texture"
"$pressed_button_texture"
Either make a custom button (better) or do this
//in ui_template_buttons.json
"button_image": {
"$keep_ratio_button_image|default": true,
"keep_ratio": "$keep_ratio_button_image"
}
//then in your button
"$keep_ratio_button_image": false
thanks! ill try that
well, i have made this little animation,
this bar is one full image,
New update thingy
I think this will fix it idk
hmm not working
how to disable button?
"enabled": false
Or with #enabled binding
okay, thanks!
no problem
is it possible to modify the player extra health? u know when u get health boost or extra hearts how they will fill up the whole screen, i need to know if u can modify them to make them not filling the whole screen
react [
] to this message if its hardcoded and not possible to adjust
Offset don't work on stacked panel, the position is left to the panel
Just remove the health and make hour own
umm, does that means i have to use titles?
or just a custom health panel for the vanilla health bar?
If there is nothing to copy the heath value from
Did i just accidentally discover the aux ids of custom blocks?
What? Wdym?
You know about the item renderer ui element?
you give it a number and it displays an item
that number is usually (65536*aux id of the item or block + data value)
for most vanilla items the aux ids are listed in the wiki
for custom items the aux id is placed in the middle of vanilla item (which shifts all the aux ids after)
and as for custom blocks? for a long time no body knew where they are (or they knew but kept it to themselves)
I was experimenting with ui today and accidentally figured out a way to display the aux id of any item including custom blocks
In my addon i have 10 custom blocks and the aux ids of them are from -9745 to -9754
and they are sorted in reverse alphabetical order, subfolder name included
for example:
-9745: shade.json
-9746: sand_pile.json
-9747: fake_ores/redstone.json
-9748: fake_ores/nether_gold.json
-9749: fake_ores/deepslate_lapis.json
-9750: end_eater.json
-9751: empty_jar.json
i achieved this using only 9 images (i can achieve it using two images but the animation requires more images)
Keep in mind custom items get inserted at 256
You can kinda fix the shifting problem using script api, sense you can get number of custom blocks
Negative numbers aren't shifted by custom items
and custom blocks starting at -9745 are far below any vanilla blocks to cause any shifting issues
is there a way to make multiple tabs for server form?
tab 1 only shows
button 1-5
tab 2 only shows
button 6-10
Yep
Oh, good to know
It is possible
Toggles that hide and show panels
#1280301965271896124
Check this for example
thanks!!
I was trying to extract the item aux id of a specific inventory slot and display it as a label for a project, when i was successful i tested a few items to see their ids when i realized i could see the ids of custom blocks too
You can get the aux id?
Property #visible, #alpha, #size_binding_x/y, #anchored_offset_x/y, #collection_length, #texture, #color
only for set property of the element itself, its value cannot be taken for other purposes or sent to other elements
is there a way to make a custom slider that does something every time I change the slider value?
yes it's possible, you can use the slider value in the bindings to do something with it
is modal form also use the long_form for server form?
custom_form
thanks!
Is it possible to control the camera using only a resource pack?
that's a VERY good question
I hate how laggy cameras are when they are server sided
I dont think so
Does anyone know how to make hover_text_renderer localize the text thats set directly via a variable in property_bag?
{
"1": {
"type": "button",
"hover_control": "hover",
"controls": [
{
"hover": {
"type": "custom",
"renderer": "hover_text_renderer",
"property_bag": {
"#hover_text": "$hover_text"
}
}
}
]
}
}
didn't know we have JSON-UI with HTML format
oh wait 1 sec xD, sorry i work with json-ui with some tooling and forgot to convert it to regular
fixed now
how can i make the mob effect screen can always open even if player doesn't have any effect?
nvm
nope
make a custom one
are there any variables that can be changed in-game besides $pocket_screen and $desktop_screen ?
Not variables but I have bindings
To detect the type of input
I need a variable
What are you trying to do?
using "variables": []
$touch, $mouse, $game_pad there are these ig
I know those, I want variables that can be in-game like in settings screen.
Okay so I needed a form where the buttons are pretty small; 20x20px and there'd be 30 buttons in a row, and 60 rows all show at once
Would that cause fps lag 😅
1800 buttons shown at the same time
I'm pretty sure that'll cause lag while opening the form
but using grid is better in this case
grids are well optimized
It really depends. If everybutton is hella complicated, then prob yeah. If its simple with a low amount of bindings and controls, then maybe no
Understood
Button will only have an image and that's it
Or actually
It'll be completely transparent
But the hover will just have a square border
It'll be like showing the outline of the button when you hover over it
is it possible to disable a button based on its name? for example, if the name includes the word "disable", the button will be disabled(not clickable)
Just use bindings to set it this way
okay, ill try that, thanks!
does anyone know how to hide the border of a slider?
The easiest way is to make the texture for slider border transparent
It's probably named slider_border.png
yeah, i figured it out right after asking the question.
is there a single way to make client side json ui contact with server side js
You just need to hide it
Ps. Mr obvious 08/06/2025
Bro intellectual 🙏
Is it possible to edit the intro of minecraft bedrock?
Intro?
Yknow like the red background with Mojang studios on it
you can't
actually you can
startup_screen.json ?
the imagine doesn't even exists in the pack from what I see
I only saw it somewhere inside the game data
yes you can
just not with addons
Edit game files?
yeah that's what I meant
Oof, im on an android 💔
The fact you can even edit friends icons in the files lol
Can't change that image into a video i presume?
nope
also thats not even the whole screen
i changed it to blue once and its just a box around the text
Bummer
yea
I wanted to make it this lol
What do you want to do?
i already fixed it 😁
"[email protected]_button": {
"$button_content": "chat.copy_image",
"$pressed_button_name": "copy_coordinates_button",
"$focus_id": "coordinate_copy_button_focus_id",
"$focus_override_left": "coordinate_dropdown_focus_id",
"$focus_override_right": "paste_button_focus_id",
"$focus_override_down": "text_edit_box_focus_id",
"bindings": [
{
"binding_name": "#copy_button_enabled",
"binding_name_override": "#enabled"
}
]
},
Is it possible to use this in any text_edit_box?
@rocky quail ?
Uhg. Entire night of digging through inventory screen to completely remove crafting in survival.. and came to the conclusion that it's easier to just hide the recipe book contents. Couldn't figure out
-
how to make the inventory default to the Survival tab, because even with the recipe book panel disabled in survival it still defaults to it and throws the inventory alignment off
-
re align the inventory
how can i make a preserve title text that acts like a normal title? like it also disappears after a few sec
Someone told me you can't do time stuff with json ui (unless it's animation)
So you can use animations to scale it into nothingness after 3 seconds
Or you can just send another title that's empty (behavior pack)
Hello, I created a button in JSON UI in the chat_screen. Is it possible to run a command without clicking on it?
Have animations and use factory to generate the title
h
"buttons_grid": {
"type": "grid",
"size": ["100%", "100%c"],
"grid_dimensions": [3, 3],
"grid_item_template": "ec_shop.items_button",
"grid_fill_direction": "horizontal",
"grid_rescaling_type": "horizontal",
"anchor_from": "center",
"anchor_to": "center",
"factory": {
"name": "buttons",
"control_name": "ec_shop.items_button"
},
"collection_name": "form_buttons",
"bindings": [
{
"binding_name": "#form_button_length",
"binding_name_override": "#maximum_grid_items"
}
]
},
"items_button@common_buttons.light_text_button": {
"$pressed_button_name": "button.form_button_click",
"$button_text": "#form_button_text",
"$button_text_binding_type": "collection",
"$button_text_grid_collection_name": "form_buttons",
"bindings": [
{
"binding_type": "collection_details",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "collection",
"binding_condition": "none",
"binding_collection_name": "form_buttons",
"binding_name": "#form_button_text"
},
{
"binding_type": "view",
"source_property_name": "(not ((#form_button_text - 'ec.shop.item') = #form_button_text))",
"target_property_name": "#visible"
}
]
},
i have this problem wherein i hide the buttons that are not ec.shop.item, it works, but as I make my Minecraft fullscreen it shows the other buttons. it only applies on grid tho. is there a fix for this?
Add "binding_condition": "once" in the bindings of the grid
"bindings": [
{
"binding_name": "#form_button_length",
"binding_name_override": "#maximum_grid_items",
"binding_condition": "once"
}
]
is it?
Yes
yo has anyone seen something like this? lol
its probably some issuse related to screen stacking, and the best part is its because of oreuI
in previous death screen it was alright
What was your problem again
Ghost buttons or smth
Also doing #visible in elements of grid will just make them invisible but their space will still be occupied
when i minimize/maximize my minecraft window it shows up the button that were hidden
Does happens casually when there's too many elements in JSON-UI side. I do have this issue too.
though generally it's likely failed to load due to screen stacking and missing certain property that leaves the screen once damaged.
since Ore-UI load them above the JSON-UI ones anyways, that's why it doesn't hide element or affect them.
that's smooth compass bar 😶... how did you do that??
entities
uhhhh this thing?
Yep using entity and materials
wait what.... how how how???? 😯
its because effects screen is overlayed on HUD, see how I enabled it in 1sec
yes exactly
q.camera_rotation(1)
yeah ik.
also.
how did you make it display on your hud?
Kinda.
they don't, but does have a certain bugs for it randomly.
most noticable one is not able to respawn and stuck on that respawning.
paper doll
wait, so you can also change paper doll entity like the live_horse_renderer?
no, its all on player
that's soooooo cool!
It's kinda like this
You add some models, render controllers and animation for the things you want to display (let's say direction)
You add these things in the player.entity.json file and render it when the player model is being rendered as a part of UI (q.is_in_ui) and some other conditions also
In the hud screen you add the paper doll, which has the models that you want to render then offset the paper doll so it's not visible and only the models are shown in the screen
And that moving direction thing is one large image that is being wrapped with help of materials and depending on camera_rotation
paper doll disappears after a few sec, right? how can i make it always show?
hud_player_renderer disappears after a while
But live_player_renderer and paper_doll_renderer doesn't so you can use those
ohh i see, okay thanks!! ill try that
ahhh so the model(for example the compass bar) is gonna be part of the player entity and i need this q.is_in_ui thing to be able to render it like as paper doll?
i did it! now i need to figure out how i can make it scroll/rotate
json ui or entity?
entity
use "-query.camera_rotation(1)" at y axis
You can't
🙁
oh materials... gg
Hello, I created a button in JSON UI in the chat_screen. Is it possible to run a command without clicking on it?
creating it based on existing packs is easy, however compared to all tries to actually get working direction in current form, then it was nightmare
yes
its moving now
but idk anything about making custom material that do the trick for this ._.
are they idiots or what?
this is literally vanilla code
who the hell even approved these ugly spaces between buttons
Yo thats so ong
Its horrible
I hope guys from mojang see this piece of shit