#Hidden Slots Issue

1 messages ยท Page 1 of 1 (latest)

echo plinth
#

I hid most of the slots people can access in HUD.

Issue is that I want to make the hidden slots survival only.

Everything works except for the button_mappings in hud_screen.json/hud_screen. It has to be a screen so I cannot make two children, one for creative and one for survival. Is it possibleto change the button mappings depending on the #is_creative_mode binding?

frozen pendant
#

remove all mappings from screen (leave the common ones that can be used in both creative and not creative mode)

#

then add two input panels to the screen controls (or hud_content, don't use root_panel because its visibility changes with f1 key, You can use $additional_screen_content in hud_screen) with size [0,0] (just in case) and add the mappings (one for creative, one for not creative)

#

and change its visibility using creative mode binding

echo plinth
#

Although got another question.

echo plinth
#

Not really important cuz making left going to slot 1 and right to 2 is good enough and kinda better.

frozen pendant
#

maybe if You use that same system changing mappings based on which slot is selected

#

if selected 0 then right selects 1, if selected 1 then right selects 0

echo plinth
#

missclick

frozen pendant
#

dw

echo plinth
frozen pendant
#

yeah the scroll weel thing

#

what i meant is that, if slot 1 is selected, enable this mapping inventory_right -> slot_2, and when slot 2 is selected, disable that mapping and enable this inventory_right -> slot_1

#

so it works like normal

echo plinth
#

Oh like this.

#

Will try it out

flat gull
#

bro you are not forget that you can type slot number when hovering item so the item instantly swap to the slot number you type?

#

in inventory

echo plinth
#

i didnt know it existed

#

wow

#

thanks for noticing

echo plinth
#

if not adding barriers in the slots seems the fix

flat gull
#

yeah item lock barrier can be an option

echo plinth
echo plinth
#

what do you think? its the players inv but not finished yet

#

have to add the slots (9 of them) and the 2 hotbar slots

echo plinth
flat gull
echo plinth
#

nah. 9 slots as in item slots

flat gull
#

9 inventory slots and 2 hotbar?

echo plinth
#

yes. 2 hotbar because they will have only an axe and pickaxe and 9 inventory slots because they will have their inventory size limited (maybe will add an upgrade to expand the inventory

flat gull
#

maybe add the max level of the skill stat

echo plinth
#

there is no max level ๐Ÿ˜ข

flat gull
#

it is good enough that what I can say

echo plinth
#

alright, thanks for the feedback

frozen pendant
#

even so, I think it's a good idea to add barriers with lock in slot, you know, just in case

echo plinth
#

yeah that is what i did ๐Ÿ˜…

#

custom clients tend to be able to change resource packs so i know there might be someone doing this

green fable
# echo plinth Yup. Works. Thanks

Do you mind showing the code how you got it working? I'm trying to do a similar thing, where i switch out button mappings in the hotbar depending on some conditions

echo plinth
echo plinth
#

I originally tried changing the mappings via modifications but it didnt work so i just hardcoded it.

Works for 1.21.130 but can change in the future