TransWikia.com

Is there a way to use relative commands in NBT tags?

Arqade Asked by Travis C on January 5, 2021

I know you can use ~ to tell your current location, but when i do this:

/summon minecraft:cow ~ ~2 ~ {Leash:{X:36,Y:82,Z:-434},NoAI:1,Age:-25000,Silent:1}

and i replace the X,Y,Z with relative coordinates, it doesn’t work. Why?

One Answer

You can't use relative coordinates in NBT.

The X, Y, and Z coordinates are raw integers. A ~ is not recognized as an integer symbol and therefore throws an error.

Comment below if you want me to give a workaround.

Answered by ExpertCoder14 on January 5, 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