TransWikia.com

Why does my MCPE command not work in MCJE?

Arqade Asked by Radioactive on November 28, 2020

I’m using the following code in MCPE:

tp @e[type=husk] @e[type=wolf] 

Java Edition shows the @e[type=wolf] in red.

What is the correct way to write this command?

One Answer

Look at the error message:

Only one entity is allowed, but the provided selector allows more than one at position 0: <--[HERE]

When only one entity will be accepted, it is your job to make sure the target selector returns only one entity. Unlike Bedrock Edition, if your target selector allows more than one entity to be selected, even if it will return only one entity when run, it throws an error.

You need to use the limit=1 parameter to limit your target selection to one entity.

tp @e[type=husk] @e[type=wolf,limit=1]

Answered by ExpertCoder14 on November 28, 2020

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