#Different inventory based on if the player has a tag

1 messages · Page 1 of 1 (latest)

pliant burrow
#

Would it be possible to do something similar to this video by InfernalDevice "https://www.youtube.com/watch?v=SCIkCqnzUKI", but instead swap out a players inventory when I give them a tag? I assume it's possible I'm just not fully sure how I'd start going about it.

deep bear
#

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

pliant burrow
deep bear
#

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

pliant burrow
deep bear
#

the dimension change advancement? no

pliant burrow
deep bear
#

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

deep bear
#

you're always welcome

pliant burrow
deep bear
#

no problem I was stuck on situations like these so I understand 😊

pliant burrow
pliant burrow
deep bear
#

you can just check if they have a tag with the advancement

#

and the rest is simple

pliant burrow
#

Hmm I'm thinking I went into this without understanding enough about datapacks lol, perhaps I should go watch more tutorials first

deep bear
#

I suggest you do that

#

I have a headache rn so can't say much 😔

pliant burrow
deep bear
#

thanks

#

I suggest watching conure or frostbyte forge or cloud wolf

pliant burrow