October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

What Is the Command to Teleport to the Nearest Ancient City in Minecraft?

Minecraft uses two commands for this: /locate structure minecraft:ancient_city to find the nearest city, then /tp @s X Y Z to teleport, with you choosing a safe underground height.
WorldMinecraft? Length3 min Posted Quest giverVGSources Team

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Minecraft has no single command that finds the nearest ancient city and teleports you there. You use two commands in sequence: /locate structure minecraft:ancient_city to get coordinates, then /tp @s X Y Z with those coordinates to move. The second step needs a deliberate choice of height, because ancient cities sit deep underground.

The two-step workflow

  1. Locate the city. Type /locate structure minecraft:ancient_city and press Enter. The game searches the current dimension for the nearest matching structure and returns its coordinates. Minecraft’s official command guide describes this locate-then-teleport pattern. Minecraft, “How to Use Commands in Minecraft” (published September 22, 2023)
  2. Choose a height. Decide on the Y value before you teleport. Ancient cities are underground, so the X and Z values from the locate result are the reliable part; the Y value is yours to pick. See the section below.
  3. Teleport. Type /tp @s X Y Z, replacing X, Y and Z with your numbers. @s targets you. /tp is the short form of /teleport, which the official guide also documents.

Bedrock and Java: what changes

The command logic is the same across editions, but the setup and the identifier differ in a few places.

  • Bedrock identifier. The current Bedrock reference lists minecraft:ancient_city as the structure name and describes /locate structure as searching for the nearest match in the current dimension. Microsoft Learn, “locate Command” (Bedrock stable reference, accessed October 8, 2026)
  • Older Bedrock builds. An earlier Bedrock identifier for the ancient city did not match the Java Edition name. Mojang’s bug record marks that mismatch as fixed in Bedrock 1.19.30. If a current spelling is rejected on an old build, update the game before troubleshooting further. Mojang Bug Tracker, MCPE-153682
  • Java single-player. Commands must be enabled for the world. Minecraft’s official guide explains this requirement for Java single-player worlds.
  • Bedrock single-player. Enable the Allow Cheats setting for the world. The Bedrock reference lists the cheats requirement for /locate.
  • Servers. The player needs permission to run commands. Without it, both /locate and /tp will be refused.

Choosing the Y coordinate

The teleport only works if you pick a Y value that suits your situation. The game does not automatically find a safe landing point, so the Y you type is the one you land on.

  • Do not aim for solid stone. Teleporting into a block can leave you stuck or suffocating, depending on your version and the block at that spot.
  • Aim for open space. Choose a Y value inside a cavity or a known open area. Check the layout first if you can.
  • Consider hazards. Deep underground areas can contain lava, deep water, and mobs. Set up protection or a safe spot before you arrive.
  • Verify on arrival. If you land in a bad place, walk out or teleport again with a corrected Y value.

Troubleshooting

  • “Unknown command” or syntax rejected. Confirm commands or cheats are enabled for your world, and check the identifier spelling against the one above. If your version does not accept the syntax, use your version’s command autocomplete to confirm the exact form.
  • No match found. /locate searches only the dimension you are currently in. If you are in the Nether or the End, it will not find an ancient city in the Overworld, and it reports an error when no match exists in the current dimension. Move to the Overworld and try again.
  • Permission denied on a server. Ask the server administrator for command permission.

Quick reference

Task Command Notes
Find the nearest ancient city /locate structure minecraft:ancient_city Searches the current dimension only
Teleport yourself to coordinates /tp @s X Y Z Y must be chosen by you; the game does not select a safe height
Full command name for teleport /teleport @s X Y Z Same effect as /tp

Use the command in the dimension where you want to search. Commands and cheats must be enabled in your world, and the player needs command permission on a server.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
200PCS Magnetic Blocks, Magnetic Building Cube Toys for Kids, STEM Montessori Stacking, Sensory Education Toys for Toddlers Building World Set, Christmas Birthday Gifts for Kids Age 3 4 5 6 7 8 9 10
  • Spark Creativity & Imagination - This magnetic building toy offers endless creative possibilities, allowing kids to freely combine and build any structure they can imagine. Whether following our pattern suggestions or creating their own designs, these building blocks foster creativity and problem-solving skills.
  • Fun Learning & Skill Development - With 200 magnetic blocks themed around forests and buildings, this set sparks imagination while enhancing focus, patience, and motor skills. Ideal for children aged 3 and up, it’s a fun way for kids to learn through play, discovering new worlds through building and rebuilding.
  • Encourage Social Interaction & Collaboration - These magnetic blocks aren't just for solo play—they encourage kids to share, collaborate, and create together with friends and family. Building and rebuilding structures as a team strengthens social skills and teaches the importance of teamwork. Powerful tool for sensory development and STEM learning for children.
  • Safe & Durable for Peace of Mind - Crafted from high-quality, non-toxic materials, these magnetic blocks meet international safety standards, ensuring a secure play experience for children. The sturdy design makes sure structures stay upright, allowing kids to confidently explore their creativity without worry.
  • Perfect Gift for Children - Whether for a birthday, Christmas, or school event, this magnetic building toy is a fantastic gift for children. It’s not just fun—it also sparks an interest in STEM (Science, Technology, Engineering, and Math) learning. Through play and creation, kids develop a variety of foundational skills, making it the perfect gift to strengthen family bonds and encourage learning.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

The Bottom Line

Run /locate structure minecraft:ancient_city to get the nearest city’s coordinates, then run /tp @s X Y Z with a Y value you have chosen for a safe landing.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How To Create Custom Stickers & Shoutouts In Monster Hunter WildsMonster Hunter WildsBlog20min
  2. How to Get XL Gogoat in Pokemon Legends Z-A (An Extra-Large Gogoat)Pokemon Legends Z-ABlog20min
  3. How to Get Rotting Lightbringer in Diablo 4Diablo 4Blog17min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.