I suck at NBT tags and stuff like that. I need to write a command that will teleport me to the closest item entity, and that item needs to be a melon slice. I can't use my world right now until I get that command or else my precious melon will despawn. Help?
Running this from the chat console should bring you to your melon slice:
/execute at @e[type=item,nbt={Item:{id:"minecraft:melon_slice"}}] run tp @s ~ ~ ~
The `execute at` statement changes the current location (`~ ~ ~`) for the command to the location of a melon slice. Then, it runs the `tp` command that will bring you (`@s`) at that location.
I suck at NBT tags and stuff like that. I need to write a command that will teleport me to the closest item entity, and that item needs to be a melon slice. I can't use my world right now until I get that command or else my precious melon will despawn. Help?
Running this from the chat console should bring you to your melon slice:
The `execute at` statement changes the current location (`~ ~ ~`) for the command to the location of a melon slice. Then, it runs the `tp` command that will bring you (`@s`) at that location.
Please, support the sledgehammer tool!
I ♥ Linux. Thanks Mojang for providing a game that runs natively on that OS!
Thanks! Will it work if the melon slice is in an unloaded chunk?
Please, support the sledgehammer tool!
I ♥ Linux. Thanks Mojang for providing a game that runs natively on that OS!