#Create a permanent way to store a players hotbar
1 messages · Page 1 of 1 (latest)
Okay
I can do it temporily
so is this system to be used for somewhere with a limited num of items?
no
so a list of 9
I mean like
could you (if you needed to) list every single item the player could get
wait do item ids work with bedrock?
same
but looking at the player inventory documentation and stuff you can grab items and I assume they can be stored
/tag @s add "1,diamond_pickaxe,0"
then
you divide that into an array
wait I wrote it wrong
Im sorry
/tag @s add "item:,1,diamond_pickaxe,0"
then you get all player tags that start with item:
divide them into arrays
then
array[1] = slot num 1-9
array[2] = item name
array[3] = item data (durability)
would that work?
this is all the info about itemstacks which it seems how scripting stores info
so data actually represents the durability then?
oh damn
after that its how much damage it has taken
wait
I just realized that there is an issue with removing the tags
nvm
you can remove all tags starting with item: before ever updating the storage