Forum: gaming.stackexchange.com
Tags: <minecraft-java-edition><minecraft-commands>
Title: I've lost a command block, how can I find it?
Question: I've placed a command block making it day all the time. I want to turn it off, but I've lost it. What's the quickest way to find it?

Answers:
sents: text: You can use NBTExplorer for this.
text: Why?
text: Because the command(s) you had in your command blocks are stored in the NBT data of the command block.
text: Using NBTExplorer, you can find the command block, but only if: you remember all or a part of the command written in it the command in it isn't in too many other blocks in the world If you do not know any part of the command being run, try typing " @ ", " / " or " " into the search box.
text: (Thanks to @MBraedley for the notice) How to install NBTExplorer: You will have to have .NET
text: framework 2.0 (or higher) to run the program.
text: You can download the installer for Windows (and Linux with mono-core and mono-winforms packages installed) here and here for Mac.
text: After downloading, unzip the .zip file (I recommend doing so to do this in a new folder).
text: Then run the program labeled "NBTExplorer.exe" How to use NBTExplorer One
text: you have installed the application, run it.
text: Then proceed by these steps: Click on File in the upper tab and then select Open Minecraft Save Folder (not needed in newer versions) Select your world from the GUI.
text: Double click on it after it shows in the window, and then single-click (select) the folder "region": If you look inside it (not needed)
text: , you should see files labeled
text: *.mca
text: or *.mcr
text: , for example "r.0.1.mcr" Click Search in the upper tab and then Find in the list that appears: A window named "Find" will pop up.
text: Inside will be two checkboxes and two text areas next to them.
text: Check both boxes.
text: In the first empty text box, enter "Command".
text: In the second one, type any part of the command in your command block you remember.
text: I guess that you used the command " time set day ".
text: If so, enter that command into the box.
text: Else enter any part of the command you remember: Click on Find or press Enter on your keyboard.
text: After a while (depending on your world size, from seconds to minutes), your search will return a result (the first it found) - it will show you the full command, the coordinates and some more NBT data of the command block with the command you searched for: My testing world (the map The Dropper) didn't have the command " time set day " anywhere, so instead I searched for /spawnpoint
text: : If this is the command block you searched for, take the coordinates it gave you (X, Y, Z) and teleport to them in Minecraft by /tp @p
text: X Y Z .
text: If the command block it found is not the one you searched for, press Search on the upper tab, and then press Find next in the list that pops up:
text: Then, repeat steps 5-7 until you find your command block!
text: If the program didn't find the wanted result, try searching for something else (eg.
text: just time set instead of time set day ).
text: For further reference, here are some links: Minecraft Forum NBTExplorer post and FAQ Minecraft Wiki: NBT tags
text: Windows/Linux and Mac download links GitHub project page Edit:
text: A very simmilar answer by MrLemon
answer_details: author: gaming.stackexchange.com/users/143228/RudolfJelin
score: 18
sents: text: Download MCEdit and select the region
text: you think the command block is in.
text: Then use the search option for ID 137 (command block).
answer_details: author: gaming.stackexchange.com/users/72500/CraftByte
score: 4
sents: text: I've never used MCEdit.
text: However, here might be a couple tips: If you've spent a lot of time in that chunk, or near it, press f3 to open debug info and check the regional difficulty.
text: Regional difficulty tells you how much time you've spent in that chunk, since Minecraft makes it more difficult if you've spend more time in a chunk.
text: If your command block is underground (as in surrounded by masses of stone) or just buried somewhere, type in /gamemode 3 to launch Spectator Mode.
text: Spectator Mode allows you to go through blocks - when you're inside a block, other blocks are hidden unless there's an opening (hard to explain).
text: You can try it yourself.
text: If your command block is in some giant mass of blocks, you should be able to find it like that quickly.
text: I might be wrong, but I'm pretty sure that command blocks don't load chunks.
text: (If they do, correct me.)
text: Turn on command block chat outputs and turn render chunks on to a high.
text: If you get the outputs, then set it lower and poke around until you find the right chunk.
text: Hopefully these help you!
answer_details: author: gaming.stackexchange.com/users/169173/C. Yang
score: 4
sents: text: Losing Command Blocks can be problematic.
text: I would first try using /gamemode spectator to look around and fly through your world before downloading MCEdit Unified (which is well-respected community branch maintained of MCEdit) and searching around.
text: In MCEdit Unified: Open your world (level.dat) Press TAB to switch to Chunk View RIGHT-CLICK and HOLD to move around your world until you see some yellow outlines Use the MOUSEWHEEL to zoom and center on your chosen area Press TAB to switch back to Camera View Use WASD and your MOUSE to fly around to locate your block
text: Delete the block in MCEdit (click to select, a menu will open) or open your world to get rid of it Good luck. :)
answer_details: author: gaming.stackexchange.com/users/169233/Moesh
score: 3
sents: text: look in your logs.
text: it logs the xyz location and command of the command block, every time it issues a command
answer_details: author: gaming.stackexchange.com/users/210352/rob
score: 1

Summary of the answers:
Look in your logs and use NBTExplorer.
While there are many ways to find a missing block, it seems that it is possible to do so, without using any third party software.