#Different inventory based on if the player has a tag
1 messages · Page 1 of 1 (latest)
you can do exactly what he did storing the player's inventory in a storage but instead of checking if the player is in a dimension or changed dimensions via dim_change advancement you can check constantly if the player has that specific tag if not keep his current inventory
Sorry but do you think you can explain how I'd check if they have the tag? Should I execute as all players with the tag
it'll be better if you made a tick advancement with a predicate that checks if the player that specific tag then run a function which loads the other inventory
so if the player does not have that tag they wouldn't get the advancement therefore they won't be giving the other inventory
Would I still even need an advancement if Im no longer checking the dimension change
the dimension change advancement? no
if its in the tick function would it be loading it every tick?
yes but the advancement is a better option
{
"criteria": {
"h": {
"trigger": "minecraft:tick",
"conditions": {
"player": {
"minecraft:nbt": "{Tags:[\"tag\"]}"
}
}
}
},
"rewards": {
"function": "runfunction"
}
}
then just run a function that revokes the advancement and gives the player the inventory
it should be straight forward from there
hmm okay thanks
you're always welcome
i appreciate the help i'm pretty new to datapacks lol
no problem I was stuck on situations like these so I understand 😊
My bad quick question, how can I store that the player has the tag instead of storing their current dimension?
why do you wanna store their tags
Well wouldnt I need too in order to have a seperate inventory for when they have a tag?
If the function revokes the advancement wont it just keep being given back to the player?
Hmm I'm thinking I went into this without understanding enough about datapacks lol, perhaps I should go watch more tutorials first
Ouch hope you feel better lol
Thanks I'll check them out