How to teleport a villager with a pseudo NBT tag?



  • Pseudo NBTs are like NBTs that aren't real like these:

    enter image description here

    So I tried doing something like this:

    enter image description here enter image description here

    But it says this:

    enter image description here

    I don't want mods - I want to do this in vanilla Minecraft.



  • First of all, those are called "pseudo tags".

    Secondly, there is an easy way to accomplish this - tags.

    By tags I don't mean NBT tags, but the tags you add on to an entity with the /tag command. Simply tag the villager with something and teleport entities of that specific tag.

    E.g. /tag @e[type=villager,sort=nearest,limit=1] foo /tp @e[tag=foo] to somewhere

    Or

    You can summon an entity with a default tag as well

    /summon villager ~ ~ ~ {Tags:["foo"]}
    

    Always look for easier ways to solve a problem.

    By the way, I tried out your original command and it seems like your original summon command would not summon a villager with the pseudo tag. Even using /data merge {Fake:1b} won't do the job. If I were you I would not waste time on this. NBT is simply something that determines entities' properties and there are other, much easier approaches to your problem.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2