TransWikia.com

Entity identification through type and name

Arqade Asked on August 13, 2021

Context:

I have a Minecraft world on mobile that I use for MLG practice.
In said world I have 2 NPCs: one for teleporting me to certain heights ( Y-levels, and the other for the more technical side (command-blocks, structure blocks and different backend stuff in a normal MCPE map)

Problem

After testing the world many times, I need to move the NPCs, for a better experience. One of them is named "Trainer", and the other is named "Programmer".

I need to teleport the Trainer NPC to a certain coordinate. How do I do that?

I have tried both of these commands to no avail:

tp trainer ~ ~ ~
tp trainer Rapper303

I also thought about including some JSON parameters, like so:

tp @e[type: NPC, name: "trainer"] Rapper303

But as far as I know The JSON params only work for the java edition of the game.

One Answer

You're using the incorrect selector. Try:

tp @e[name="trainer"] ~ ~ ~

It looks for @e, all entities, and name="trainer", with the name trainer (case-insensitive).

Correct answer by Penguin on August 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP