#JSON-UI General
1 messages · Page 42 of 1
"jukebox_popup_text": {
"$show_text_background": false
},
i fixed that but i now the action bar
yep
What is contained used for?
i have no idea, there is no documention for it anywhere
It seems that it is to prevent the draggable element from leaving the parent.
I have forgotten a lot about it, but from the horizontal scrolling code that I once created, it might be something like that.
is it possible to build this?
simply no
unless if u can modify the oreUi
unless...
isn't the inventory screen not in oreUI yet?
im pretty sure you can still modify that panel but not add custom functions to it
yes, u can modify the inventory screen, but u cant just add new slots or new functionality to it yet
yeah
unless, if u can make specific images from the hudscreen visible only when u go to the inventory screen (possible or not, idk)
and making the hudscreen always visible (possible)
Stuff like this is like
it's possible but you don't know how or why
got it. If i did it in chest ui (not the entire inventory, just the artifacts part), how would i add scroll panel?
i mean this
can you check my dm plssss
I got lot of dms so I don't check them much
why?
gonna guess you want me to do the json ui stuff
no I don't really accept proposals
plus not that expert tbh
I have damn one issue I still don't know how to fix
told ya my answear
i dont wanna dirty the json ui channel about not related stuff thats why i do dm thank you for replying
ay it's fine
I'm just busy guy that's all I guess
is it possible to make custom server form without interfering other custom form? (different pack)
use bindings
wheres the block , view xbox profile etc buttons located?
You can't. That's hardcoded
"background": {
"type": "image",
"size": [
"100%",
"35%"
],
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"texture": "textures/ui/Black",
"alpha": 0.7
}
is there a way to change the size value depending on the device? It's too small on mobile, but it looks fine on pc.
is this the right way of doing this or is there a better way?
- edit the vanilla toggles so only one can be active at a time
- make the toggles into buttons that hide it current panel and show the next/previous panel
I think you’re describing radio toggles, and yeah that’s possible
Ah wait, I see you want forward and backwards buttons in that same content, ignore my response
yeah i know, can forms toggles be modified to be radio toggles?
why to use sliders @oak verge
eh, never worked with sliders so i am not sure how to achieve that with them
how can I make my button show all the text? right now, it stops at "p" and the rest "qrstuvwxyz" isn’t showing.
I made a UV animation for the hud_screen that shows up, but it's stuck on the first frame. Has anyone had this issue before?
Do aseprite animations play on the hud?
I did mine like that
it works but uhh
not expert but I wanted the thing to be vertically, it's horizontally rn
Anyway lol, guess it's up to how you did it
the new copper golem is kidna interesting, the way he function is by checking if the container has a specific item or not, which we did get the ability to do a while ago,
like they gave us the ability to check if the container has a specific item or not, and after a while they added the copper golem that just do that
was that a teaser or something?
Thank you for your response. I'm going to try to make mine look more like yours by adding frame count, fps, and easing.
Just heads up this gonna be horizontally because idk how to make it vertically
The debug log says unknown properties for frame_count and fps.
wha
works for me tho
Hmm, I could try rotating it to make the strip horizontal?
It'd be weird if that'd worked, because in the past it's only worked vertical for me
mine's already horizontal
uh, is it possible to change the game volume via scripts?
-# stupid question, just like the asker
That's not a stupid question, and you're not stupid. Also, unfortunately there is not.
assuming we got the ability to change the player fov, we might get the ability to change the volume in the future
Exactly right! It's definitely possible.
and i will be using that on my visuals addon
uh, i just realised i am in the wrong channel lmao
i need to sleep
i also hope that mojang add one single simple thing to the jsonUi, which is: detecting the player dynamic properties to do something to the ui (show/hide images for example)
imagine if player gets like a tag, image shows
instead of spamming title
like instead of using titles or chatmessages, we can use something like a dynamic property and change its value using scripts to control the images
you know there's one thing I hate about titles in fact
-# feeling funny might open-source the undertale textbox thing /jk
For whatever reason, having a horizontal strip instead of a vertical one fixed it for me 😂
Thanks for your help!
Np lol
yeah so
if you press F1, like hiding ui stuff
the title thing won't show during it
making images not appear evenn if you press F1 again
I hate that
you can disable that i think
i think it is possible now using scripts
-# im not sure i haven't tried it at all
joke aside — if you're using root_panel as a base. this element has a bindings that changes it's visibility.
The workaround? don't use the root_panel element i guess lmao
damn that leaves with another issue
how do I make more than one image appears
if I won't use that
hmmmmmmmmmm
wait how tf do I even do title thing without that
this also not just have visibility with f1 and stuff, this also carries with hud alpha (that slider on video settings that changes the HUD transparency)
thanks for the hint I guess
i also made a funny thing with UT/DR dialog that allows me to move anywhere with just numbers on actionbar
so i have this thing:
"loop_size":{"anim_type":"offset","duration":1,"from":[0,"-100%c"],"to":[0,"-100%c"],"next":"@hud.loop_size"},
"weak_damage_hide_anim":{"anim_type":"wait","duration":0,"destroy_at_end":"chat_grid_item"},
"weak_damage_panel":{
"type":"panel",
"anchor_from":"center",
"anchor_to":"center",
"layer":0,
"size":["100%","100%"],
"controls":[
{
"weak_damage_image":{
"type":"image",
"texture":"textures/ui/damaged/damaged",
"bindings":[
{
"binding_type":"view",
"source_property_name":"('@' + #text - 'Hello' - 'xVisWeakDamage' = '@' + #text)",
"target_property_name":"#destroy"
},
{
"binding_type":"view",
"source_property_name":"(not #destroy and not ('@' + #text - 'xVisWeakDamage' = '@' + #text))",
"target_property_name":"#visible"
}
]
}
},
{
"weak_damage_hide":{
"type":"collection_panel",
"size":[0,0],
"factory":{"name":"empty","control_name":"hud.weak_damage_hider"},
"bindings":[
{
"binding_type":"view",
"source_control_name":"weak_damage_image",
"source_property_name":"(#destroy * 1)",
"target_property_name":"#collection_length",
"resolve_sibling_scope":true
}
]
}
}
]
},
"weak_damage_factory":{
"type":"panel",
"controls":[{"weak_damage_sfactory":{"type":"stack_panel","size":["100%","100%"],"offset":"@hud.loop_size","anchor_from":"bottom_middle","anchor_to":"top_middle","factory":{"name":"chat_item_factory","control_name":"hud.weak_damage_panel"}}}]
},
"weak_damage_hider":{
"type":"panel",
"anims":["@weak_damage_hide_anim"]
},```that show/hide images using chatmessages, but it has one issue
the image will be flashing when u send any message
wha
my discord is not rendering those code.
here's what it looks like when I scale down the image from filling the screen to [64,64]
https://cdn.discordapp.com/attachments/1367221971502366850/1387926855298060388/Screenrecorder-2025-06-27-01-44-06-366.mp4?ex=68650ddc&is=6863bc5c&hm=1db29187ba3becb73a7f8b3c40718128bf218e5a73f5bcbb81e09777b2d964bf&
Smart fella
I tried to do something like this but with just animated image "don't care about size I just want this to be done lol"
one issue is that the animation seems to be playing in background still and I can't find way to fix that
that's the one thing holding me back from this
apparently, the first image is the only one that will be effected for some reason, so is there any way to render the second image instead of the first one?
Heya! Does anyone here have a tip how I could hide the title background if the subtitle has a specific text?
yeah funny enough is not like i did recreated a entire actual DR intro within bedrock
with like couple of images.
damn, that's cool
Just use these
"hud_title_text/title_frame/title_background": {"alpha": 0},
"hud_title_text/subtitle_frame/subtitle_background": {"alpha": 0},
put them anywhere
Could I do this conditionally? I'd only want to hide / ignore it if a specific text is present
Ideally, I'd like to hide the background of the title, but not the subtitle - as that's the only thing actually containing text
I'm talking to someone way more intelligent than me
Is there an animation play_event for when the element becomes visible? So it always resets and starts over when it becomes invisible and visible again?
that might be tricky but I'll see what can i do within mins.
Thanks so much!
Essentially.. this is what I'm currently seeing. I'm sending an empty space as the title (aka " ") as the subtitle otherwise doesn't appear, but since 1.21.90 the client is rendering a huge square for empty text...
u need to trigger the animation when u show the image,
like when u send the title that will show the image, the animation will be triggered with it, but i think spamming titles will keep refreshing the animation
mojang added these backgrounds for no reason at all
I mean even in general they just look terrible
you could normally disable it in game settings
or that ui thing
Yeah, it's an accessibility setting
How do you trigger the animation when a title is changed? Is there an event for that?
the titles look better without them anyway
true
But I'd rather not require players to go into those and have to change it 😄
i have the codes but for chatmessages not titles
just said that's another way
in case someone plays in addon that didn't fix that yet
- kinda bugged,
as u can see here
here i think this might work.
"hud_title_text/title_frame/title_background": {
"bindings": [
{
"binding_name": "#hud_subtitle_text_string",
"binding_name_override": "#text",
"binding_type": "global"
},
{
"binding_type": "view",
"source_property_name": "((#text - '<your text to hide.>') = #text)",
"target_property_name": "#visible"
}
]
},```
But is there no way to do it with title?
haven't tested it but should in theory be.
Thank you very much! Really appreciate it 💚
hiding the text only when u send the specific titles? thats good tbh
if you want the opposite,
"hud_title_text/title_frame/title_background": {
"bindings": [
{
"binding_name": "#hud_subtitle_text_string",
"binding_name_override": "#text",
"binding_type": "global"
},
{
"binding_type": "view",
"source_property_name": "(not((#text - '<your text to hide.>') = #text))",
"target_property_name": "#visible"
}
]
},```
honestly this is pretty basic.
its better than hiding the background completely
My confusion was around how I'd target the background of the title based on the subtitles text :p
This makes it quite a bit clearer, thanks!
well for me anyways despite im being a uhhhh person with 3-4 years experience over JSON-UI
I'm just expert with json entities that's it lol
to the point I'm creating funny stuff without scripts like fully working sidewalks bit of offtopic I guess
I feel sleepy
I'm just searching right now, could screen_animation_reset do it?
But I think that is for the whole screen, not just one element, so it probably doesn't reset when it's made invisible and visible again?
It feels like there has to be a good way to send a trigger for an onscreen animation.
By default, elements that is directly from factories elements will reload everything including animations.
title and actionbar has them.
but you can certainly change animations within conditions.
so there's not much needed.
What do you mean by this?
Wait
Damn this might solve my issue
holy shit
If I create a factory for the element, and then create an instance from the factory, it will reset automatically when visibility changes?
basically, once you run /title. factory elments that is within title or actionbar, everything gets reseted.
Yo can you ping me if you got it working
it might solve my damn issue
if it affect ui animation too
This is so peak
btw screen_animation_reset resets animation when the screen is unloaded.
That could work. Do you have any tips on how to accomplish this?
I have very limited experience with factories.
i.e - leaving settings screen and entering them etc.
that might not help anything too much tbh.
since hud does not unload.
hmm, is it possible to render an image from the always visible hudscreen only inside the inventory screen?
-# once again, stupid question bec the answer is 90% no
it's just
"factory": {
"type": "panel",
"layer": 30,
"factory": {
"name": "hud_title_text_factory",
"control_ids": {
"hud_title_text": "<element>@<namespace>.<element>"
}
}},```
or at least detect when the player open/close the inventory using scripts?
-# another stupid question
-# i need to sleep really bad lmao
for actionbar, just replace title to actionbar
If this uses the hud_title_text_factory, does it need to be placed within the hud_title_text element?
No.
you can't overlay other screens.
but you can overlay behind the screen.
I know there's a query for players in UIs, but not that I know of for inventory specifically.
it doesnt help much tbh
what about adding a new image inside the inventory screen and control it using the always rendering hudscreen? like using titles
probably no, bec they've not connected
they're screens.
and screens do not get collapsed each other.
so no, probably not.
doesnt matter if you have like layer 999999 or not
it will not work.
hmm, what about adding a new image using a new file (_ui_defs.json thing) and use inventory_screen to render it and the always rendering hudscreen to control it?
again, they're screens.
it's like 2 html pages trying to combine into one.
which, obv not possible.
-# im just making sure
Create a factory, set the control id to the element you want to control.
"<element>_factory": {
"type": "panel",
"layer": 30,
"factory": {
"name": "hud_title_text_factory",
"control_ids": {
"hud_title_text": "<element>@<namespace>.<element>"
}
}},
Then insert the element using the factory wherever it was before.
{
"<element>@<namespace>.<element>_factory": {}
},
honestly i don't know why people are skipping factories everytime they're working on title.
while yes, they work. but they do not work as mojang intended which, is actually from factory.
If you want to know my reason, it's because there's not enough information and tutorials.
though actionbar is the only thing that required you to have factory since there's no bindings for that.
99% of my JSON UI knowledge comes from hitting things with a rock and finding stuff that works some of the time.
That's not a way to be proficient or efficient in anything you make.
I'll add a small tutorial about how to add custom title and stuff properly in the future if I'm not busy though
it's obviously gonna be on wiki.
maybe how to render images and stuff with that aswell
That would be extremely appreciated. 🙂
I also hope that what I said didn't come off as shaming or passing off resposibility; the people in this discord & especially you have already done so much for that issue. I owe so much that I have learned to this community.
I was more intending to say that all of the effort is just unfortunately not enough; there is just too much to cover and not enough time and effort to do so.
thanks
What is this? Only used in server form.. most probably ModalFormDataSliderOptions.valueStep?
is it possible to render the hotbar when the server form is open?
slider_timeout_binding
``` interesting
Put "force_render_below": true
In third_party_server_form
okay, thank you!
What does it function for?
look cool! grow a garden in minecraft
is it possible to make this stack factory:
"weak_damage_factory":{
"type":"panel",
"offset":[0,"100%"],
"controls":[{"weak_damage_sfactory":{"type":"stack_panel","size":["100%","100%"],"offset":"@hud.loop_size","anchor_from":"bottom_middle","anchor_to":"top_middle","factory":{"name":"chat_item_factory","control_name":"hud.weak_damage_panel"}}}]
},
```stack two images using one chtmessage instead of sending two?
bec currently, i have to send two messages to make the image visible and two to make it invisible: https://cdn.discordapp.com/attachments/1378753517967376535/1389933205921992735/Screenrecorder-2025-07-02-14-36-28-936.mp4?ex=68666bac&is=68651a2c&hm=6cc8b8c6a322646405a1fa87e1d7db8e0b07c1205f1b3769c3a95318a19b4a99&
bruh xD, I had the same idea but I gaved up bc of the custom blocks they use too much performance
Does anyone have a hive server style scoreboard? (use titleraw to display)
Anyone knows why my scroll has a empty space??
maybe the table itself?
Put "binding_condition": "once"
In the bindings of the grid for maximum_grid_items
It worked, thanks
isnt it issue related to actual buttons amount in that form? Why once condition is working here may I ask?
The binding #form_button_length gives the correct value once at first but then for some reason it gives incorrect value which generates those ghost buttons
So when binding condition once is applied the binding maximum_grid_items update only once that is with the correct value of form_button_length
How to fix
I have question, because I've never worked with draggable stuff: Can I use draggable for example on some image and detect if it it's positioned in the right place? Like for Memory game?
I don't think so
How to make animated ui frames vertical?
It's horizontal rn and I don't really know how to change that
I could be blind dunno
uhhhhh
someone can help me??
Ok
Is it possible to do something like this?
yes. You'll need a panel with offset animation
How would i make this entity not be able to take damage&knockback??
{
"format_version": "1.16.100",
"minecraft:entity": {
"description": {
"identifier": "neptune:cratesnpc",
"is_spawnable": true,
"is_summonable": true,
"is_experimental": false
},
"components": {
"minecraft:physics": {
"has_gravity": true,
"has_collision": true
},
"minecraft:pushable": {
"is_pushable": false
},
"minecraft:push_through": {
"value": 1
}
}
}
}```
whoops wrogn channel
yo
any1 know how to make my chat item factory only be fed info that starts with "toast,"
"type": "panel",
"size": [
"100%",
"100%"
],
"binding_condition": "(('%.6s' * #text) = 'toast.')",
"factory": {
"name": "chat_item_factory",
"max_children_size": 1,
"control_ids": {
"chat_item": "[email protected]_panel"
}
}
},```
this is the factory
the issue is i have a custom hud elemsnt controlled by chat (specifically prefix toast. to update it)
but the factorykinda sees all chat messages as a update or something of that nature and causes the hud element to flicker
esp if i have a repeating command block like this
/tellraw @a {"rawtext":[{"text": "toast.hud element"}]}
and then someone were to send a chat message that hud element would flicker
"binding_condition" is a invalid element property.
secondly, that is a binding's property.
ty
so whats the solution?
im still dont know a whole lot im only trying diffrent things and hoping something works
ik what the issue is
i need the factory to only revice and be fed "toast." msgs not ALL chat messages
i just dont rlly know how to go about that
put this on your @hud.test_panel element.
"bindings": [
{ "binding_name": "#chat_text",
"binding_name_override": "#text",
"binding_type": "collection",
"binding_collection_name": "chat_text_grid",
"binding_condition": "once"
},
{ "binding_type": "view",
"source_property_name": "(not((#text - 'your thing') = #text))",
"target_property_name": "#visible"
}
]```
literally.
alr heres what i got
"type": "panel",
"size": [
"100%",
"100%"
],
"bindings": [
{
"binding_name": "#chat_text",
"binding_name_override": "#text",
"binding_type": "collection",
"binding_collection_name": "chat_text_grid",
"binding_condition": "once"
},
{
"binding_type": "view",
"source_property_name": "(not((#text - 'toast.') = #text))",
"target_property_name": "#visible"
}
],
"factory": {
"name": "chat_item_factory",
"max_children_size": 1,
"control_ids": {
"chat_item": "[email protected]_panel"
}
}
},```
...
i added those bindings u provided to the factory
?
read this again,
mb lol
anyways this is what i have for test_panel
"type": "panel",
"anchor_from": "top_right",
"anchor_to": "top_right",
"size": [
"100%",
"100%cm + 0.5px"
],
"bindings": [
{ "binding_name": "#chat_text",
"binding_name_override": "#text",
"binding_type": "collection",
"binding_collection_name": "chat_text_grid",
"binding_condition": "once"
},
{ "binding_type": "view",
"source_property_name": "(not((#text - 'your thing') = #text))",
"target_property_name": "#visible"
}
],
"controls": [
{
"[email protected]": {}
}
]
},```
the issue seems to be persisting
do you wanna see the full file? maybe i meessed sum up
you forgot to rename the your thing
jesus christ mate
Hey chill of course this whole thing is complicated
still don't know how I somehow learned this
"type": "panel",
"anchor_from": "top_right",
"anchor_to": "top_right",
"size": [
"100%",
"100%cm + 0.5px"
],
"bindings": [
{ "binding_name": "#chat_text",
"binding_name_override": "#text",
"binding_type": "collection",
"binding_collection_name": "chat_text_grid",
"binding_condition": "once"
},
{ "binding_type": "view",
"source_property_name": "(not((#text - 'toast.') = #text))",
"target_property_name": "#visible"
}
],
"controls": [
{
"[email protected]": {}
}
]
},```
this should be it?
all i did is just gave a code example and where to place, and yet fumbled the entire thing atp idk anymore
yeah, try it.
alr
nah same issue
still, don't expect anyone to immediately understand it even if it sounds obvious to you.
yeah ive only just recently started
See? your doing pretty well if that's the case lmao
thanks
np mate
i found a great example in #1072983602821861426 and kinda reverse engineered it and learned a few things
just cant get over this one error
its fustrating beacuse i KNOW whats causing it i just dont know how to fix it
send me a file
dms or here?
ill check in next few mins since my game is crashing all over again
i def disabled dm here ig
ill check it in few mins
if i can get my game working ofc
alr thx man just lmk
well i guess ill look it myself then i suppose.
the game still not working.
Where did you get this UI from?
it's looking oddly too advanced and not extremely friendly to modify with.
looking like u are trying to make an image visible using chatmessages, right?
technically it is possible, but kinda glitchy
since i have some codes that will make an image visible and trigger its animations, but its kinda bugged now bec for some unknown reason u cant use more than one 'next' on the animation, so all u can do with that thing animations is fade in/out
fyi i done quite alot with chat messages but idk where did this guy get a UI from.
-# ||chat||||g||||p||||t||
wrong.
like if i want to make a looping animations like this:
"weak_damage_in":{
"anim_type":"alpha",
"easing":"linear",
"duration":0.1,
"from":0,
"to":0.5,
"next":"@hud.weak_damage_out"
},
"weak_damage_out":{
"anim_type":"alpha",
"easing":"linear",
"duration":0.3,
"from":0.5,
"to":0,
"next":"@hud.weak_damage_in"
},```it won't work since the 'next' in the 'out' section does not work
this one is actually readable JSON-UI file aside from them slapping binding_condition and expecting them to work.
even the entire bindings is actually usable.
maybe the ai is getting better?
or maybe he's just doesn't know what to do
-# just like me
ain't no way dude just picked a most advanced working chat messages or "notification" and somehow doesn't work on their end.
it's funny.
i have those codes:
"loop_size":{"anim_type":"offset","duration":1,"from":[0,"-100%c"],"to":[0,"-100%c"],"next":"@hud.loop_size"},
"image_hider_anim":{"anim_type":"wait","duration":0,"destroy_at_end":"chat_grid_item"},
"image_hider_panel":{"type":"panel","anims":["@image_hider_anim"]},
"weak_damage_panel":{
"type":"panel",
"anchor_from":"center",
"anchor_to":"center",
"layer":0,
"size":["20%","20%"],
"controls":[
{
"weak_damage_image":{
"type":"image",
"texture":"textures/ui/damaged/damaged",
"alpha":"@weak_damage_in",
"bindings":[
{
"binding_type":"view",
"source_property_name":"('@' + #text - 'Hello:true' - 'xVisWeakDamage' = '@' + #text)",
"target_property_name":"#destroy"
},
{
"binding_type":"view",
"source_property_name":"(not #destroy and not ('@' + #text - 'xVisWeakDamage' = '@' + #text))",
"target_property_name":"#visible"
}
]
}
},
{
"weak_damage_hide":{
"type":"collection_panel",
"size":[0,0],
"factory":{"name":"empty","control_name":"hud.image_hider_panel"},
"bindings":[
{
"binding_type":"view",
"source_control_name":"weak_damage_image",
"source_property_name":"(#destroy * 1)",
"target_property_name":"#collection_length",
"resolve_sibling_scope":true
}
]
}
}
]
},
"weak_damage_factory":{
"type":"panel",
"offset":[0,"100%"],
"controls":[{"weak_damage_sfactory":{"type":"stack_panel","size":["100%","100%"],"offset":"@hud.loop_size","anchor_from":"bottom_middle","anchor_to":"top_middle","factory":{"name":"chat_item_factory","max_children_size":2,"control_name":"hud.weak_damage_panel"}}}]
},
that will make a-
an image visible
by sending 'xVisWeakDamage' on the chat, twice
i can't read.
and sending 'Hello' twice to hide it
it works fine
totally not apparent by sandwiching codes
but its animations is bugged,
it has this weird ass issue
like why does the first 'next' works but the second doesn't?
i have no clue what are you talking about rn
uh,
Can you help me do this?
this animation:
"weak_damage_in":{
"anim_type":"alpha",
"easing":"linear",
"duration":0.1,
"from":0,
"to":0.5,
"next":"@hud.weak_damage_out"
},
"weak_damage_out":{
"anim_type":"alpha",
"easing":"linear",
"duration":0.3,
"from":0.5,
"to":0,
"next":"@hud.weak_damage_in"
},
supposed to loop
"weak_damage_in":"@hud.weak_damage_in"
???
my bad lmao
and it does looping
which are you displaying though.
but somehow it doesn't
title or what
chatmessages
this thing
i mean, the animation should be looping no matter what i am using to render it, right?
No if title/actionbar with factory.
chat messages? yeah maybe
i have not encounter any issues with anims not looping so far in my end
i tried it in the old system i have, the looping does work
its a stack factory, the images it is generating are just stacking instead of overriding other images,
and images generated from a factory with have the animations already running without issues
like fade in/out or even looping
currently, it does fade in/out
but not looping
I know what this is mate.
my issue is there lmao
it's not like this is my 20th time making another chat messages with factories and not even encounter any animation issue once.
chat message supposed to be stack factory.
unless you're putting another factories inside it.
-# to hide the image
You're adding factory inside a factory?
u can see it here ig
"weak_damage_panel":{
"type":"panel",
"anchor_from":"center",
"anchor_to":"center",
"layer":0,
"size":["20%","20%"],
"controls":[
{
"weak_damage_image":{
"type":"image",
"texture":"textures/ui/damaged/damaged",
"alpha":"@weak_damage_in",
"bindings":[
{
"binding_type":"view",
"source_property_name":"('@' + #text - 'Hello:true' - 'xVisWeakDamage' = '@' + #text)",
"target_property_name":"#destroy"
},
{
"binding_type":"view",
"source_property_name":"(not #destroy and not ('@' + #text - 'xVisWeakDamage' = '@' + #text))",
"target_property_name":"#visible"
}
]
}
},
{
"weak_damage_hide":{
"type":"collection_panel",
"size":[0,0],
"factory":{"name":"empty","control_name":"hud.image_hider_panel"},
"bindings":[
{
"binding_type":"view",
"source_control_name":"weak_damage_image",
"source_property_name":"(#destroy * 1)",
"target_property_name":"#collection_length",
"resolve_sibling_scope":true
}
]
}
}
]
},
"weak_damage_factory":{
"type":"panel",
"offset":[0,"100%"],
"controls":[{"weak_damage_sfactory":{"type":"stack_panel","size":["100%","100%"],"offset":"@hud.loop_size","anchor_from":"bottom_middle","anchor_to":"top_middle","factory":{"name":"chat_item_factory","max_children_size":2,"control_name":"hud.weak_damage_panel"}}}]
},
the animation supposed to be like this:
A → B → A → B~ ~ ~
but it works like this
A → B-
it just stop
anyways, this sometime happens on anything that is looping rapidly fast so just put a wait and make it loop.
i.e
wait > a > b > loop etc
right but that doesn't work either
the whole issue is in the 'next' inside the animations
like this 'next' does work
"next":"@hud.weak_damage_out"
it does go from the A to B
but this 'next' that is inside B
"next":"@hud.weak_damage_in"
doesn't go from B to A
the whole 'next' thing doesn't work
thats my whole issue
i thought it was from the stack factory or from the panel or whatever the hell that is,
but it was from the image animations, it just doesn't work right for absolute no reason
even if i make an animation with 3 points
A - starts
B - wait
C - ends
so it should go from A to B to C
but it stops at B bec the 'next' that will make the animation go from B to C doesn't work
-# trying to explain the issue.
yeah idk can't replicate the issue so far
hold on
what the actual fuck, it does work now
im so freaking confused
¯_(ツ)_/¯
maybe cuz I changed the texture from my custom image to White?
or this animation just somehow fixed it
"weak_damage_in":{
"anim_type":"alpha",
"easing":"linear",
"duration":4,
"from":0,
"to":1,
"next":"@hud.weak_damage_out"
},
"weak_damage_out":{
"anim_type":"alpha",
"easing":"linear",
"duration":4,
"from":1,
"to":0.5,
"next":"@hud.weak_damage_i"
},
"weak_damage_i":{
"anim_type":"alpha",
"easing":"linear",
"duration":6,
"from":0.5,
"to":0,
"next":"@hud.weak_damage_in"
},
idk im so confused, hold on lemme try it again
this is using the exact same anims btw lmao
yeah i can't replicate the issue still
now it doesn't work
im so damn confused
this is def your end rn it seems. i suggest you rewrite it lol.
i can't replicate the issue no matter what i do so, i don't have a clue how to fix it.
here's the whole code i have,
-# idk why i made the file as javascript
ok why did you send me that
so u can see the code better and try it
bec it works and it doesn't work at the same time
like the codes are quite unstable
especially for the first image, sending a message will make it flickering, so i have to render the second one by lowering the entire factory and sending two messages to render the unaffected image.
you wrote the code
currently, leave the offset inactivated
no, bakedpotato~ did
since the size is set to 20% just for better viewing/testing
try the codes later, they do work (make the image visible by sending 'xVisWeakDamage' and making it invisible by sending 'Hello:true'
but its animations are bugged, that's all.
is it possible to get specific scoreboard value and use it as text value?
maybe this could help
https://discord.com/channels/523663022053392405/1361228974620934165
-# idk if that's what u want.
https://discord.com/channels/523663022053392405/1338743808187174922
Follow the process
how to increase scoreboard limit? currenlty it only shows 15 lines
You can try removing the binding for #collection_length
Not sure if that's going to work
-# never tried modifying scoreboard
It's in the scoreboards.json file where there's the factory that generates these lines
okay thanks! i can't find a way to remove that at the moment, so I'll experiment with it later
What should I do if two form servers conflict?
Merge them
How to
like i said previously i found a system from #1072983602821861426
Can someone explain me how the factories work and give an example how to implement them in server forms?
hmmm, fuck the hide method, show me how did u do this and if i can use it to render my images without causing lag (like the image is keep generating by sending any messages but it wont be visible only when u send a specific message) bec that is the old system, which is quite laggy
lol no
if i use stack factory thing to render the images with the animations and give it 10 max child thing, it will generate the image normally but it will keep generating it by sending any chatmessage, right?
like i have sent one chatmessage to render the image, and after i send the other 10 my first image will be hidden or not?
-# sorry if my questions/explanations needs alot of explanations, im kinda drunk currently bec i have a stupid otitis media
¯_(ツ)_/¯
wrong time to ask.
bec thats what was happening with normal factory
after i gave it that max child thing
i think it will work better with stack factory, lemme try it ig
hold up, the animation bug thing is actually from the stack factory thing!
its not happening bec of the image destroy system or anything related to the image itself
so all i have to do is try changing the stack factory system from the current one:
"weak_damage_factory": {
"type": "panel",
"offset": [0,"100%"],
"controls": [
{
"weak_damage_sfactory": {
"type": "stack_panel",
"size": ["100%","100%"],
"offset": "@hud.loop_size",
"anchor_from": "bottom_middle",
"anchor_to": "top_middle",
"factory": {
"name": "chat_item_factory",
"max_children_size": 10,
"control_name": "hud.weak_damage_panel"
}
}
}
]
},
to something better
Is there any way I can modify the UI that shows the vanilla hearts? For example, if the player has a hunger effect, I want the heart to be green.?
how to get rid of the extra spaces? i just made the button start from collection index 6
"dynamic_button": {
"type": "stack_panel",
"size": ["100%", 32],
"orientation": "horizontal",
"controls":[
{
"form_button@common_buttons.light_text_button": {
"$pressed_button_name": "button.form_button_click",
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100%", 32 ],
"$button_text": "#form_button_text",
"$button_text_binding_type": "collection",
"$button_text_grid_collection_name": "form_buttons",
"$button_text_max_size": [ "100%", 20 ],
"bindings": [
{
"binding_type": "collection_details",
"binding_collection_name": "form_buttons"
},
{
"binding_name": "#collection_index",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "view",
"source_property_name": "(not (#collection_index < 5))",
"target_property_name": "#visible"
}
]
}
}
]
},
maybe its because of the panel
okay
show me the stack factory codes of this thing.
😭
just the stack factory, i am having alot of issues with it currently
like its not working properly, keep crashing the game
at least tell me what i have done wrong with this
"waok_damage_panel":{
"type":"panel",
"layer":0,
"size":["20%","20%"],
"controls":[
{
"waok_damage_image":{
"type":"image",
"texture":"textures/ui/White",
"anims":["@weak_damage_in"],
"bindings": [
{
"binding_type": "view",
"source_property_name": "(#text = 'xVisWeakDamage')",
"target_property_name": "#visible"
}
]
}
}
]
},
"waok_damage_factory":{
"type":"panel",
"anchor_from":"center",
"anchor_to":"center",
"size":["100%","100%c"],
"controls":[
{
"waok_damage_sfactory":{
"type":"stack_panel",
"anchor_from":"bottom_left",
"anchor_to":"bottom_left",
"factory":{"name":"chat_item_factory","max_children_size":3,"control_name":"hud.waok_damage_panel"}
}
}
]
},
or i have to maybe use discord ignore thing.
sending two messages just crashes the game, no images are generating or stacking or anything
gotta love that I'm getting pinged for 5th times IN A DAY even though im busy asf
uh,
"oh lets ping harlow more just to help me fix my own factory panel for 5th times today"
yeah dude
jesus christ
alright, I'll keep trying ig
does anyone know how to fix this? im trash at json ui
"hud_actionbar_text": {
"type": "image",
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"offset": [
4,
-10
],
"size": [
"100%c + 12px",
"100%c + 5px"
],
"texture": "textures/ui/hud_tip_text_background",
"alpha": "@hud.anim_actionbar_text_background_alpha_out",
"controls": [
{
"actionbar_message": {
"type": "label",
"anchor_from": "left_middle",
"offset": [
8,
0
],
"anchor_to": "left_middle",
"text_alignment": "left",
"color": "$tool_tip_text",
"layer": 31,
"text": "$actionbar_text",
"localize": false,
"alpha": "@hud.anim_actionbar_text_alpha_out"
}
}
]
},
"hud_actionbar_text_round": {
"bindings": [
{
"binding_name": "(query.scoreboard('round_show') == 1)",
"binding_name_override": "#visible"
}
],
"type": "image",
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"offset": [
4,
-10
],
"size": [
"100%c + 12px",
"100%c + 5px"
],
"texture": "textures/ui/hud_tip_text_background",
"alpha": "@hud.anim_actionbar_text_background_alpha_out",
"controls": [
{
"actionbar_message": {
"type": "label",
"anchor_from": "left_middle",
"offset": [
8,
0
],
"anchor_to": "left_middle",
"text_alignment": "left",
"color": "$tool_tip_text",
"layer": 31,
"text": "$actionbar_text",
"localize": false,
"alpha": "@hud.anim_actionbar_text_alpha_out"
}
}
]
},
and...
{
"hud_actionbar_text_area": {
"type": "panel",
"factory": {
"name": "hud_actionbar_text_factory",
"control_ids": {
"hud_actionbar_text": "[email protected]_actionbar_text",
"hud_actionbar_text_round": "[email protected]_actionbar_text_round"
}
}
}
},
im trying to make it so the round counter actionbar only shows when ur round_show score is 1
and im also tryna make it separate from the normal actionbar
but it aint workin
anyone know why?
Has anybody got a ui template for a custom block
How the _ui_defs.json actually works The literal inside is like this:
"ui_defs": [
"ui/bosses_bar.json"
]
And inside the ui folder
is _ui_defs.json
And
example.json
But it doesn't read that. I've already tried setting it as a hud screen, and it works if I change it to hud_screen , but I want to make it more organized, so I want it to read it with _ui_defs, but it doesn't work. Please help me 😿
Where I can find json ui for Camera item? Or is there possibility to add/make screenshot in the server forms? So it will add to portfolio or in the folder with ss?
seems familiar 🤨
Whole year ago bro
how can i split text on the action bar? like
actionbar text "text1::text2"
label_1
text1
label_2
text2?
Is there a more efficient way of doing server forms other than the visible property? If I understand correctly it will render all of them, then hide the ones that don't match. Seems like a pretty bad limitation if we want more than one or two new forms.
possible via bindings
https://discord.com/channels/523663022053392405/1378704585958490122
is it possible to make 2 different resourcepacks with server form work together ?
yes you can. But it will more complicated
how ?
complicated as in will it make other issues ?
I don't know how to tell you, because the complex part is knowing the server pack resource code. Because that's another hard part
if you don't know how it's works and how it's behave, then you may break the form
anyway, you can split the resource only and then UI pack only. make sure the UI pack only is on top
assuming the resource only doesn't have UI form and it's component inside
@normal moat sry for @,but i really want u help me. I want modify item hover text,i tried edit ui_common.json(highlight_slot_panel)but not use. The effect I want is to be able to add more elements to the hover panel. please save me.tks alot
i dont do minecraft things anymore
@normal moat please save me!
May I add you as a friend
I said I can't help, I'm busy. Just ask here and wait for an answer
How does the server/realm know what global resourcepack we are using?
I use "coordinates hud" which displays coordinates even though the server has that feature turned off, that's against the rules, but how does the server know?
Yooo that's me... don't use that pls.
Still it didnt worked so..
that's why I said don't use it... That's old ASF.
Sorry lol
How the _ui_defs.json actually works The literal inside is like this:
"ui_defs": [
"ui/bosses_bar.json"
]
And inside the ui folder
is _ui_defs.json
And
example.json
But it doesn't read that. I've already tried setting it as a hud screen, and it works if I change it to hud_screen , but I want to make it more organized, so I want it to read it with _ui_defs, but it doesn't work. Please help me 😿
do it like this:
{
"ui_defs": [
"ui/bosses_bar.json"
]
}```
I believe that's not json UI
how do I add a background image to labels?
Is there possibility to recreate screenshot button from pause menu into server form? And it should do screenshot like normal one
No
#1067876857103536159 or #add-ons
What is the name of the texture that appears in the background of the inventory? The white part
Hello Guys
Anyone knows any Sites that can easy build a JSON UI or any wrappers?
And how do i even create one, never did it yet.
So is there any tutorial or introduction
I want to ask this again, Can we make a ui element escape its parent? if i have a button and i want the hover control be anchored to the corner of the screen instead of the corner of its parent, how can i do that?
I want to change the text font of the boss bar text, do you think this will work?
"boss_name_panel": {
"type": "panel",
"size": [
"100%",
"100%c"
],
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"controls": [
{
"boss_name": {
"type": "label",
"color": "$boss_name_text_color",
"text": "#bossName",
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"shadow": true,
"bindings": [
{
"binding_name": "#bossName",
"binding_type": "collection",
"binding_collection_name": "boss_bars"
}
]
}
},
{
"@bar_progress_revil": {
"font_type": "MinecraftTen",
"layer": 20
}
}
]
}
"bar_progress_revil": {
"type": "panel",
"anchor_from": "top_left",
"anchor_to": "top_left",
"offset": [
-260,
0
],
"size": [
256,
32
],
"bindings": [
{
"binding_name": "(#bossName = '§bRevil')",
"binding_type": "collection",
"binding_collection_name": "boss_bars",
"binding_name_override": "#visible"
}
]
}```
is it possible to play sound effect using bindings?
how can i render player's inventory inside the server form?
nope
Ok
idk if this will work but try to copy the grids from the inventory screen
okay, will try that later!
how can i add a hover text to a server form button?
guys, is it possible to make animated images inside the horse screen?
bec i tried making one and it just didn't work, like the image or the panel couldn't reach the animation for some reason
I guess, but idk how
It shouldn't be any different
it just keep saying 'couldn't find the animation' or unknown property
Share your code and full error
uh, its in my laptop, and i have already removed it,
but it basically just doesn't work like the animation is fine, nothing is wrong with the animations but when i try to apply it to the image or panel, it just doesn't work
i tried a flip_book animation and alpha
and used "anims":["@flipbookAnim"] and "alpha":"@alphaAnim"
and both just doesn't work
and the log just says:
| newPanel | couldn't find the animation 'alphaAnim'```
something similar to that
What's the best way to learn JSON UI?
There is no best way since learning is subjective, you know yourself better than anyone.
However, if I would need to relearn it again I'd probably go:
- Learn JSON (very basic part but crucial to avoid errors)
- Head towards the wiki and learn about elements.
- Combine those information with your goals/ideas and produce a working UI. The quality doesn't matter.
- Repeat until you learn and learn.
u can learn from my addons if u want, i have some docs in the codes
TryAgain
can i make the uv slice vertically for flipbook anims
tysm
how do I make a separate actionbar, where it doesn't effect the normal actiobar
https://wiki.bedrock.dev/json-ui/json-ui-intro#conditional-rendering-with-variables something like this ig
And? Leave it alone, he can sell it for the price he wants, the pack is not for you, you are a developer who knows how to make stuff, this pack is for normal users who doesn’t know anything about UIs
Idk why are you blaming him, it’s the customers fault, if he wants to pay a lot of money for that
I do have some customers that they do know my services are expensive, but they still decide to hire me because they feel more secure and liked my worked
It may look generic for you, but not for them
i can tell you just look up my message history or something since ts was month ago.
and again, "replicate" people work does certainly not worth more than that.
don't exactly have time to argue since i have a job and stuff so get ghosted for now.
I didn’t I just looked at this channel, I’m not that active in here
That was the last I looked at this channel a month or so
Ok go and cry you are bad at this
Keep crying while that man is getting paid so shut up
is it possible to rotate the model of live_player_renderer?
pain 🥲
I want to show number in a specific font
How to do it? With glyphs and unicode?
Yep
is there an easy way to add padding buttom on the panel?
How do I convert each digit of #health to its unicode
"20" -> "\uE002\uE000"
How do I do that (to reference the glyph)
Using size
So if the panel size is [10, 10] and your button is size [5, 5] and positioned correctly, you can have padding
If in this case you anchored your button exactly in the center of the panel, your padding will be 2.5 in each direction
Separating the digits is no problem but converting them into Unicode I don't know about that
You separate using / and % right?
Yeah
% is not directly usable so math trick for that
That's easier actually
Oh yeah the - x / one?
Yes
Cool
What about separating text? Let's say I got text1:text2:text3
And I want to separate it and get the middle one text2
There's something in the dev resources for this
Awesomee, can you link it?
I've been searching for it in the documentation for a while now lol
bro you're random and somehow mad at a month old argument is crazy
touch some grass mate
atleast i make more than trying to scam people with it ¯_(ツ)_/¯
Does anyone know how to remove actionbar background? in json ui
boooohooo this guy having a life, waaaahhhh waaaahhh
"hud_actionbar_text": {
"texture": ""
}
Huuuuh I thought it would be shadow: false
Isn't this a shadow? Why would minecraft have it as a texture-
Also is it possible to round up/down or just remove decimal places?
i am 😎
That's not a shadow, that's an image
if you're working with integers you won't come across a floating point number
Unfortunately it's a float (health)
working with floating point is kinda hard as it cuases crash sometimes
what are you trying to do with it?
I have health of range [0, 100]
I have 6 images to represent the health (from full heart to empty heart)
I don't want to do some binding magic to get this to work
https://wiki.bedrock.dev/json-ui/json-ui-intro#conditional-rendering-with-variables
is there anyway that the action bar can be for many different uses
like im gonna make a script that have prolly millions of different strings to display
for the other action bar
then ig you could normalize that range to be 1 to 6 and then use it in json ui
that'd be much easier
Huh? Isn't #health the binding to get the player's health?
aren't you getting the value from scripts?
also are the numbers in [0, 100] integers?
Nope they are floats
Uh nope but I am trying to get the player's health
No scripts should be required for this
i believe #health isn't a hardcoded binding and also it doesn't give the player's health
the heart renderer in the hud_screen is a hardcoded renderer and it doesn't even use bindings
so idk if there's a way
you can use the paperdoll method to display the heart textures
then only the paperdoll needs to be added using json ui the rest is through player.entity.json, render controllers and animation
yeye I know how the other way works, but it's soo overkill for sth like this
how can i adjust the clip of this render?
make a panel of with the size of the area you want to keep, apply clip_children: true, and put the paperdoll inside that, adjust offsets accordingly
ah okay, thanks!
bro ur cooking I want to play that mmm
me trying to change the slot 0 texture
anyone 🥲
one thing you can do is make all the item cells have the image but display it conditionally based on their collection index using #collection_index binding
i gave up on editing the inventory ui 
got it now, thanks!!! inventory json ui looks a bit confusing for me 😵💫
what's the texture name of this green thing?
ah okay, thanks! ill try that
is this still part of "$item_collection_name": "inventory_items"?
didnt work, ill try to find it later
That for crafter disabled slot
It's probably hotbar_items
Let's say I have 10 separate data I need to transfer to json UI through title
Whcih is better? Sending each data separately in it's own title with a unique identifier as the prefix?
e.g.
sendTitle(data1:<data 1 value>)
sendTitle(data2:<data 2 value>)
sendTitle(data3:<data 3 value>)
OR
a single sendTitle(<prefix for preserving title>: <data 1 value> : <data 2 value> : <data 3 value> : etc)
And I parse it and fetch the data I want?
personally i use a single one since sending each title different ticks is annoying to work with and sometimes doesnt work
Yeah, you need 1 tick difference per set title
it's better to use the first option if you're not updating the title every second, for example, when displaying coins. I only update it when the player's coin count changes and i use the preserved subtitle for content that updates every second.
like this
Perfect that's exactly what I was worried about
Well since our lovely json ui mojang devs did not put health as a data binding, I need to send health number every time player gets hurt or regenerates so we can safely assume it'll be very frequent 😔
That's really smart! So title for temporary data and subtitle for permanent data
yeah and i use the "update" text as prefix to update the subtitle since its not gonna show if there's no title showing
who knows the texture name of the green hover in the inventory? i’ve already tried editing every green texture in the ui folder, but none of them worked
It's probably highlight_slot.png
wait what, thanks! but how can i remove the white outline?
That's probably the focus_border_white.png
But straight up removing that will also remove the white border from some buttons
That looks nice!
anyone must make this ui
The first one is better
And performs better since you are not sending all the data in a single tick
Also it shouldn’t be hard to work with that, it’s just skill issue
Just send all the data in different ticks
That would be very complex (and very lag)
hmm, maybe i can make without animated loading with this https://discord.com/channels/523663022053392405/1367781904685858816
how to use size_binding_<x/y> to change size?
also, can it be used in other places? (offset and so on)
whats happens with the new version 1.21.93? my form, my buttons with glyph text is broken
I very much disagree
If you want to transfer 10 pieces of data at the same time, you do them in 10 entire packets! And in 10 ticks?!?!? That's definitely not better performance.. 10 ticks in 0.5 seconds
Well that’s how script api works, you can’t call many api methods in a single tick
Of course depends on how much stuff you call in your sidebar
From the api
yes but my goal is transferring several data in one tick
Why?
Unless it’s in cache don’t do that
For example, calling getAllPlayers(), getAllEntities() and stuff like that takes a lot of ms
Now imagine sending all that data per player
Yep it'll be from cache
Yeah for sure
Each player will have their own 'data cache'
I'm using dragonfly (software similar to pocketmine), so I'm used to creating caches
First of all, it's a percentage value (float) and it depends on the size of the parent
So, if parent size is [100, 100] and size_binding_x is 0.05 then the width of that element will be 5
The variables are used directly in the size property or in binding or what?
In binding
how can I make this animation stop on the last frame?
"settings_hover_anim": {
"anim_type": "flip_book",
"initial_uv": [ 0, 0 ],
"frame_count": 2,
"frame_step": 14,
"fps": 8,
"reversible": false,
"resettable": false,
"easing": "linear"
},
I'm struggling with this UI stuff. Anyone able to create a template I want a new table that has 2 inputs to create a recipe like this
@manic dragon sorry tag
I want to ask about preserved text which is often used in title
Can preserved text be used to hold the value of a #hover_text?
Because when the inventory slot is clicked, the binding name #hover_text will disappear completely.
I want to hold the previous value so that it doesn't blink, and update the value again when the #binding_name appears again.
You should be able to preserve the binding value with that method
But I can't say for sure if it'll work in this case
Give it a shot ig
To control #visible I'm still a bit confused,
because when the #hover_text binding disappears there is no #visible update
and when #hover_text reappears it updates #visible whether it's false or true
[#hover_text && #hover_text != #preserved_text]
Maybe this is possible, but it will only update if the item is moved
Controlling the visible property is the main key to this trick
So work on the condition and I'd recommend setting #hover_text at the end based on #preserved_text to avoid any loop
EchoRif single handly helping the JSON UI community 🫡
I only help with the things I know 🙂
how can I create state transition flipbook animations?
(I want to play one animation when going from default to hover and another one going from hover to default)
After a full bloody day learning this stuff (never done it before), seperate inventory space for each block, scrollable bars, all the rest.... finally got all my chest to work. also got my image working too, thanks @versed lichen for the helppul; vids
isnt it form?
no, that is chest ui
Feels like just a glorified donkey/horse screen to me tbh
that's only reasonable way to add more slots than chest itself.
and since there's many of that chests with diff variants, yeah i can tell why it is loading too long.
yeah
interesting
I would love to see moving items right there, from inventory to these all slots
because extending default limit simply should not work lol
where is entity inventory ui located?
i made a custom Health HUD that replaces the hearts render, but when i start the game the custom Healthbar UI doesn't appear, ¿some help?
https://github.com/LeGend077/json-ui-examples
This should help
There's an example here for animated button states
You can find code related to JSON UI here. Contribute to LeGend077/json-ui-examples development by creating an account on GitHub.
what screen did you use? chest?
Amazing!
Horse screen most likely
Yeah chest_screen. But doesn't alter any other chest with the image that's above. Which I was having trouble with at first
yeah, funny enough horse/donkey does not have limit.
you could just edit donkey entity to have more slots, modify the UI just to display more slots and that would be it.
No server crashes or anything whatsoever as they do work like what it should.
such a odd oversight but that's pretty much been abused for "chests with more slots" many times now.
does the entity inventory also use small_chest in chest_screen.json?
How? From what the others are talking about, it seem not possible
You can specify the screen it uses iirc
but for "container" type?
I meant from container_type
yeah
"minecraft:inventory": {
"container_type": "container"
}
does this container type use small_chest?
yeah, but ive altered it now, so both small chest and double chest now have the respective icon above
"icon": {
"$prefix": "data:",
"type": "label",
"text": "#player_health",
"size": [
150,
10
],
"controls": [
{
"[email protected]_control": {}
}
],
"bindings": [
{
"binding_type": "view",
"source_control_name": "data_control2",
"source_property_name": "('§z' + (#preserved_text - $prefix))",
"target_property_name": "#player_health"
},
{
"binding_type": "view",
"source_property_name": "(#player_health = '§z100')",
"target_property_name": "#visible"
}
]
},
The main issue is that it always makes the element not visible even though it shows in text that it's 100
thats soo cool!
Is there a way to change the image size depending on the title? For example, the default size is size: [0, 5], but if the title includes the word 'half', the size changes to something like size: ["50%", 5]?
uhhh this way, well I tried it with inventory but got crashed game, interesting that these screens dont have limits
but as you said it requires to edit entity
I am not sure where entity exactly but I guess its in behaviour pack somehere
any custom entities that supports inventory.
kinda like player ones
although player is more hardcoded so that's why you can't increase it's slot.
yeah, I mean I tried it many years ago I guess lol, but on some custom server on pocketmine which used .php, I always got crash so I managed to skip it, using custom entities this time was wild or wasnt a thing I guess lol
I managed to do it several times but i thought it gonna get fixed in the future but nah it doesn't.
it been like that for years now.
I kissed your hands! It's done very well
ahhhh finally i did it! entity inventory now shows 5 layers :))
100%c means its gonna adopt the size of the elements inside, right?
size of all the child elements combined
how can i make this container scrollable?
Make a scrolling_panel and then put these as $scrolling_content
"iron_chest_panel_top_half": {
"type": "panel",
"size": [ "100%", 132 ],
"offset": [ 0, 11 ],
"anchor_to": "top_left",
"anchor_from": "top_left",
"controls": [
{ "[email protected]_label": {}},
{
"[email protected]_scroll_panel": {
"offset": [ 3, -2 ],
"size": [ 170, 110 ],
"$scrolling_content|default": "stylax.iron_chest_grid"
}
},
{
"image_27": {
"type": "image",
"texture": "textures/ui/iron_chest",
"layer": 2,
"alpha": 1,
"anchor_from": "top_left",
"anchor_to": "top_left",
"offset": [ 72, -30 ],
"size": [ 32, 32 ]
}
}
]
},
"[email protected]_root_panel": { "size": [ 190, 220 ], "$chest_panel": "stylax.iron_chest_panel_top_half" },
"gold_chest_grid": {
"type": "grid",
"size": [ 162, 162 ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"grid_dimensions": [ 9, 9 ],
"grid_item_template": "chest.chest_grid_item",
"collection_name": "container_items"
This is what imm using in my iron chest, see the crollable part
[email protected]_scroll_panel
Also this is the part i use for image size - see image 27 part
size 32, 32 is what i use to achieve this size
thanks! but i already did it 😁
Ah ok, not a problem, im not a pro at this only started learning yesterday, but if you need help ill try my best
all done, not to release it 🙂
what people thing about the upgrade item texture? too simple?
did have this one first?
Try sometin like this I guess for the middle part
oooh great idea, thanks
👍
or maybe diagonal? you choose lol
idk up to what you find good
I'll have a dabble with both
this reminds me of java mod that stacks the items higher that 64 and able to upgrade/add crafting table on it
Yeah it's similar to how some java ones are. But not a direct port of any as there's too many choose from to ask for permission so I've created my own textures and stuff (behaviour)
How can I leave 1 menu open after interacting with the form button?
can someone help me with this?
https://wiki.bedrock.dev/json-ui/preserve-title-texts
i've read it alot and added it to my current existing hud screen but im not sure what im doing wrong
? Hmm i dunno
i like this one
this one it is then , cheers
add glass chest :))
currently adding these and the double variant
how would i display an element using preserve text without is getting removed when i display another title.
use a different name for data control
wdym?
#1394088567281811596 message
not what i meant
i need the element to not get removed when another title don't have the flag
Ugh, getting closer to completing it, just double chest now
like for example you run a title with "update:one", element/text or something will show, and if you run another title with "update:two" for example, the first title still shows(no other changes) and second title will also appear?
yeah
check the example i sent on that forum
its gonna be something like this
{
"title_1": {
"$update_string": "update:one",
"type": "label",
"text": "#text",
"controls": [
{
"title_1_data_control": {
// ...
}
}
],
"bindings": [
{
"binding_type": "view",
"source_control_name": "title_1_data_control",
"source_property_name": "(#preserved_text - $update_string)",
"target_property_name": "#text"
}
]
},
"title_2": {
"$update_string": "update:two",
"type": "label",
"text": "#text",
"controls": [
{
"title_2_data_control": {
// ...
}
}
],
"bindings": [
{
"binding_type": "view",
"source_control_name": "title_2_data_control",
"source_property_name": "(#preserved_text - $update_string)",
"target_property_name": "#text"
}
]
}
}
this is how i do it, title 1 will show when titles include update:one and if i run another title with update:two, title 1 still showing(no other changes) and title 2 will show
what if a title don't include any of the two
nothing's gonna happen to the titles
to update it, run a title again with "update:one New Text"
to remove the title "update:one§z"(this is how i hide the title)
but the elements will get removed
any work around this?
like for example i want to show a text with 'show-' and only hide it with 'hide-'
i still haven't tried that, the only way i hide my preserve title is by adding §z at the end of update string like this "update:one§z" its like empty value
That does not look like a chest to me
How to remove the background from entity nametags?
Not possible with UI
And i dont think is possible to remove it
Rayos 😦
Lo siento buddy -\ ( ,/') /-
there has to be a place where the background gets set no?
Can anyone tell me if there is a way to drag the coordinate bar to another side?
And how?
its on hud_screen.json
Okay, thank you very much for your help
"more_info": {
"type": "image",
"texture": "textures/ui/tooltip_default_background",
"size": [
"100%c + 10px",
"100%c + 10px"
],
"layer": 0,
"controls": [
{
"text": {
"$update_string": "update:info:",
"type": "label",
"text": "#text",
"layer": 1,
"controls": [
{
"subtitle_data_control": {
"type": "panel",
"bindings": [
{
"binding_name": "#hud_subtitle_text_string"
},
{
"binding_name": "#hud_subtitle_text_string",
"binding_name_override": "#preserved_text",
"binding_condition": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#hud_subtitle_text_string = #preserved_text) and not ((#hud_subtitle_text_string - $update_string) = #hud_subtitle_text_string))",
"target_property_name": "#visible"
}
]
}
}
],
"bindings": [
{
"binding_type": "view",
"source_control_name": "subtitle_data_control",
"source_property_name": "(#preserved_text - $update_string)",
"target_property_name": "#text"
}
]
}
}
]
}
how can i make my image appears only if my subtitle contains the update string?
simple use binding clips and binding color
and you forgot #
i changed the position of player_position_text, how can i remove this?
Make the subtitle_data_control a sibling of your image then use the #preserved_text property from the subtitle_data_control to make the necessary condition and control image visibility
Don't change visibility of the image keeping subtitle_data_control as its child
And also subtitle only updates when title does so keep that in mind
"player_position": {
"ignored": true
}
This should remove the current player position text
thanks!
how to add background image for the elements inside the stack panel?
"background": {
"type": "image",
"size": [
"100%c",
"100%c"
],
"texture": "textures/ui/tooltip_default_background",
"layer": 0,
"controls": [
{
"stack": {
"type": "stack_panel",
"orientation": "vertical",
"controls": [
{
"quest_title@quest_indicator.quest_title": {}
},
{
"quest_objectives@quest_indicator.quest_objectives": {}
},
{
"quest_rewards@quest_indicator.quest_rewards": {}
}
]
}
}
]
}
quest_title, quest_objectives, quest_rewards is just a label element
You can do that just like you added the background for "stack"
Making an image and having the content as its control
like this?
"stack": {
"type": "stack_panel",
"size": [
"100%",
"100%"
],
"orientation": "vertical",
"controls": [
{
"background": {
"type": "image",
"size": [
"100%c",
"100%c"
],
"texture": "textures/ui/tooltip_default_background",
"layer": 0,
"controls": [
{
"quest_title@quest_indicator.quest_title": {}
},
{
"quest_objectives@quest_indicator.quest_objectives": {}
},
{
"quest_rewards@quest_indicator.quest_rewards": {}
}
]
}
}
]
}
hmmm
I meant adding an image for each control of the stack panel
Only then there would be different background for quest_title, quest_objective etc.
actually, what I want to do is make my background responsive, so if I add more text, the background adjusts based on the elements inside my stack_panel
is that possible?
In this code
Set the size of stack_panel to ["100%cm", "100%c"]
thank you!!!
No problem
I got your question wrong the first time
So, ive finally completed, my UV Chests addon (U = Upgradeable, V= Variation).. took way too long
btw what does cm means in json ui, still centimeter?
Width or height of the largest control
achievement_screen I think
or maybe not dunno I just typed achievement
You can through animation
Ong mr gindlenton chat interaction?
I want to learn more about hud_screen does anyone know where I can learn?
'completed'
how can i get the offhand slot display and render it somewhere?
It's in toast_screen.json
As for the offhand slot you'll need either script or player.entity.json
You can't do that with only json ui
??
oh just that the chests didn't close when you exited them, and some didn't open till you replaced them
but the uis look great if that's what you meant
ahhh thanks you!
Yeah they didn't open coz before I recorder I did a /kill @e. That's now fixed so they shouldn't die using commands
And the closing is also fixed. Now closes after exiting the inventory
oh that's good
does collection_name only work with stack_panel?
Technically you can with title preservation right?
use collection_panel
i didn't know that existed, its not showing in my autocomplete, anyway, thank you!!
not sure if this is the right channel to ask but
is there a way to add custom ui buttons and listen for their click events
Yep. That's why I mentioned scripts
what’s the variable name for the item name?
for inventory count, it is #inventory_stack_size
or smth like that
what is it for the item name?
when using
"ignored": "$menu_style != 5"
will it skip the creation of all other menus? I remember seeing -somewhere- that the default bahaviour, and a reason not to create too many server forms is that the conditional system will create every form when the script action is called, then conditionally render only the one that is met.. trying to think of a way to avoid wasting memory and processing 😵💫
It is not currently an issue and I know pre-optimization is usually a waste/etc, but working on the player auction house and banking system which uses HTTP to get from a postgres database and then is pulling in pretty large JSON strings, so I want to absolutely make sure I have the headroom to make that system work
debug screen?
yesn't
it's my debugging texts, i did not intend to make it for debug screen
isnt it basic text splitting? or if you calculate its length so some char, then isnt it laggy, because of binding loop?
it is a dynamic one yeah, it calculates the text length, then short it to nearest separator and use text splitting for it.
this also means i can make a several weird text bubbles like maybe hive scoreboard thing without the need to change %. value ever.
it has no text limits and works with linebreak (\n), doesn't lag, can use many split texts as you want (maybe 200?)
this is basically weeks and months of progress on what am i doing with this with endless crashes and somehow memory leaks.
I have stress tested about 20 splitting texts and i seen no lag so far, not even a stutter too.
how can i adjust my 1st panel position if 2nd panel appears? like this
and if panel 2 disappears, the 1st panel will go back to its original position
yea, well generally lags here may not be a thing because text shouldnt be something complex to calculate for game, however for bigger strings I think it may hurt performance, especially when you would need to constantly update one value and resend that string to hud every half second
yeah even with 2,000~ length i thought it gonna lag but nah, just very similar to chat messages.
idk if its even worth it because of this, in way where you just ignore string when it doesnt match sounds better without any loops etc, however requires more complex logic to script side
Currently i have no plans to use this stuff as for now since i'd rather stick with my preferred way to render.
try to send it every some ticks
unless i have no choice to certain projects i work for people
alr
they're running every ticks.
alternatively i can use it without factory.
but sometimes that doesn't always work due to the fact that i need to increase one character just to make the thing visually change.
test it with different data every next tick maybe, well I just saw how loops may create lag, and thats why I didn't really try to make it that way
while it does look like very complicated, i also make sure that the binding only ran once, so it doesn't loop that often.
thats interesting
casually i may also use ignored on bindings aswell just to not make them run in conditions.
well, if I created such a thing I would test it in literally all ways to see if it doesnt break or crash game and all that stuff
or maybe, well I just wanted to ask about this and I wish you luck then
lmao
i also found out that you can combine stuff and bindings would think that it's actual function
i.e '%.'+#thing+'s' would make it usable like splitting text for some reason
that's where i took advantage of that.
and for whatever reason bindings condition may not work if you don't have a space to certain part, idk what weird JSON-UI stuff going on with this
i think this probably is gonna be my final of exploring json-ui and go do something else entirely as for now.
Mask 1 to 10 seems like you just wrote out whats coming across in your head lmao
yeah i have absolutely no idea what should type so i just type random as possible for this silly showcase
i have no use for it.
Haha
use a stack_panel ig
I mean, it makes sense and it works lol
I use something like this in high amount and its working in not only this experssion
you can also bind offsets this way btw
yeah i did that quite alot
sizes color whatever
for me it still doesn't make sense but if it works, it works lmao
yea
What is the UI file where the frozen effect is located?
Ah, I needed that, because my image has to fill the screen, from corner to corner, do you know how I could do it?
Just use the setting
"fill": true
And would "size" be necessary?
Not really
I set the fill to true, it connects perfectly from side to side but not from top to bottom, ay skipes 38 pixels and it makes it much bigger
Ik, i dont really know how to fix that
😓
Try "keep_ratio": false
average json ui experience
lmao that happened to me so many times while editing the inventory ui
anyway, is there a way to get the player's pfp from the pause menu and render it in server form?
Minecraft.exe stopped working
i been told you can't
what did you do lol
you can i think.
lemme experiment little bit
yeah nevermind no.
you can display player's skin instead but not profile icon.
no idea, lol
it is fixed tho
can we make it so it only show player head?
you can use clip
yeah.
not all skins are same height tho
Someone who can help me with a simple thing that is how I do for the two bars not bug
((#preserved_text - 'level:') * 1)
anyway, how do i make a grid of 5xn?
I'm new to json ui
how to get the value of server form label?
.title("Title Screen")
.label("test") // this
.button("Play");
"text": "#form_text"
how about the body?
if modal, you'll have to get it through collection indexs.
im using ActionFormData
i think .label also is a factory thing
so yeah its collection index
you can fetch form body as usual.
i actually have no clue what this is or what it mean tbh
Guys I wanna ask something
it basically allows you to create mulitple clone of your elements by changing how many indexes you want
How can i prevent server form Close after clicking buttons?
i want to make server form buttons into a grid of dimensions 5xn, n can change depending on how much buttons i have, or should i just set it to a high number?
Without affecting their functionality
this means you can't just fetch and expect it to work without indexes
you can increase the children element size that your grid is currently using.
if you wondering what the actual size that the UI rendering, you can use debug property (i.e "debug": "red") to show a element size like a hitbox debug thing.
you can change its color aswell i think
red, green, yellow, orange white etc
there's a list on wiki in which colors you can choose for debug property.
i will check that
how do i hide an element if it has not text (a form button that was not defined)
thanks!!
you can use condition on your said children element from your grid.
you may need to use dymanic grid order to make the button actually disappear or otherwise it will leave a empty space.
dynamic grid?
Dynamic grid fills button and act like stack panel. instead of seeing a dummy buttons, dynamic grid will remove them instead.
there's obv few cons - you can't use grid dimensions, which you will have to rely on element size instead.
and it can't be vertically filled.
just seeing your dev log makes me want to learn json ui too 😭
it's impressive
the fact that u also know how to do pixel art stuff like texturing
and u could even make a model
it's impressive really
Add
"grid_fill_direction": "horizontal",
"grid_rescaling_type": "horizontal",```
to your grid parent element.
oh my god i hate discord on desktop
thanks! I'm trying to learn everything to figure out what I'm good at, but 3d modeling is still my favorite
Someone help me, please😭😭
that just removed everything, lol
yeah it is a dynamic grid.
you need to replace the size property value to [ "<whatever>", "100%c" ] to make them work properly.
your question is not clear
for the buttons? or the grid
grid.
I made a bar of this video https://youtu.be/_J5Bi-krhw8?si=SRuNqqZIsdsL-kHQ
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
oh god i messed alot of details
Then I wanted to add another bar but only one appears
however, here's the example of dynamic grid because im too focused on many work atm @oak verge
"dynamic_grid_example": {
"type": "grid",
"size": [ "100%", "100%c" ],
"grid_item_template": "namespace.yourelement",
"grid_fill_direction": "horizontal",
"grid_rescaling_type": "horizontal",
"collection_name": "form_buttons",
"bindings": [
{ "binding_name": "#form_button_length",
"binding_name_override": "#maximum_grid_items"
}
]},```
thanks
maybe open a post

👍