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?

  • 1
    For future reference, it's easier to simply type /gamerule doDaylightCycle false than to use a command block, for various reasons.
    – 2xedo
    Feb 17, 2015 at 22:39
  • 1
    – Vemonus
    Oct 17, 2016 at 13:44

7 Answers 7


You can use NBTExplorer for this.

Why? Because the command(s) you had in your command blocks are stored in the NBT data of the command block. 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. (Thanks to @MBraedley for the notice)

How to install NBTExplorer:

You will have to have .NET framework 2.0 (or higher) to run the program. You can download the installer for Windows (and Linux with mono-core and mono-winforms packages installed) here and here for Mac.

After downloading, unzip the .zip file (I recommend doing so to do this in a new folder). Then run the program labeled "NBTExplorer.exe"

How to use NBTExplorer

One you have installed the application, run it. Then proceed by these steps:

  1. Click on File in the upper tab and then select Open Minecraft Save Folder (not needed in newer versions)

  2. Select your world from the GUI. Double click on it after it shows in the window, and then single-click (select) the folder "region":

Nice, right?

If you look inside it (not needed), you should see files labeled *.mca or *.mcr, for example "r.0.1.mcr"

  1. Click Search in the upper tab and then Find in the list that appears:


  1. A window named "Find" will pop up. Inside will be two checkboxes and two text areas next to them. Check both boxes. In the first empty text box, enter "Command". In the second one, type any part of the command in your command block you remember. I guess that you used the command "time set day". If so, enter that command into the box. Else enter any part of the command you remember:

Did you see that? Pure skill!

  1. Click on Find or press Enter on your keyboard. 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:

Again, such wow

My testing world (the map The Dropper) didn't have the command "time set day" anywhere, so instead I searched for /spawnpoint:

entered image description here

  1. 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 X Y Z.

  2. 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:

entered image description here

Then, repeat steps 5-7 until you find your command block!

  1. If the program didn't find the wanted result, try searching for something else (eg. just time set instead of time set day).

For further reference, here are some links:

  • I tested this on WIndows 8. Works fine on 1.10 (and older, I suppose). Step 1 can be skipped as of newer versions of NBTExplore.
    – user143228
    Oct 18, 2016 at 18:14
  • This is a great solution. Can you uncheck the value box to search for every command block (for instance, if you don't know the command that is being run)?
    – MBraedley
    Oct 21, 2016 at 1:29
  • @MBraedley Yes, but you would serch for every command block that would have a command in it, not for all command blocks by doing so. And thanks for the +50!
    – user143228
    Oct 21, 2016 at 11:46
  • Yes, that's what I meant; I guess I was a bit ambiguous.
    – MBraedley
    Oct 21, 2016 at 12:42
  • @MBraedley I think searching for @, ` , /, e`, etc. would be better. Or, if you want to find an empty command block, using MCEdit would maybe be better. But thanks for the suggestion, didn't think about it :)
    – user143228
    Oct 21, 2016 at 15:42

Download MCEdit and select the region you think the command block is in. Then use the search option for ID 137 (command block).


I've never used MCEdit. 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. 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.
  • 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. 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). You can try it yourself. If your command block is in some giant mass of blocks, you should be able to find it like that quickly.

  • I might be wrong, but I'm pretty sure that command blocks don't load chunks. (If they do, correct me.) Turn on command block chat outputs and turn render chunks on to a high. If you get the outputs, then set it lower and poke around until you find the right chunk.

Hopefully these help you!


Losing Command Blocks can be problematic. 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.

In MCEdit Unified:

  1. Open your world (level.dat)
  2. Press TAB to switch to Chunk View
  3. RIGHT-CLICK and HOLD to move around your world until you see some yellow outlines
  4. Use the MOUSEWHEEL to zoom and center on your chosen area
  5. Press TAB to switch back to Camera View
  6. Use WASD and your MOUSE to fly around to locate your block
  7. Delete the block in MCEdit (click to select, a menu will open) or open your world to get rid of it

Good luck. :)


look in your logs. it logs the xyz location and command of the command block, every time it issues a command


Use Worldedit (or download it) and type //replacenear 100 command_block air to get rid of your command block.

  • 1
    Why is this answer so downvoted? Feb 7, 2015 at 18:43
  • 7
    @EliasBenevedes Probably because it doesn't explain itself very well. Not only does it not explain very well that it requires a mod, but also because in not explaining the command, it fails to mention that it will kill all command blocks within a 201m cube, which is somewhat important to mention before recommending its use... Feb 7, 2015 at 19:48

this is how to,

  1. exit the game
  2. go to 1.8 update by clicking edit profile
  3. go back to the world
  4. /time set night
  5. if it changes back to night save and quit
  6. change back to the newest update
  7. /time set night again
  8. it should work like it did in 1.8 :D

im not sure what it does but it stops the command block from working :D

  • 1
    It'll stop the command block because downgrading will cause all blocks from the latest update to be deleted as they are not valid blocks in older updates. Downgrading is a bad option; not only will it potentially corrupt a world, but you won't know where the command block was because it has been deleted (which means it wouldn't be useful for restoring a backup and deleting the block in the non-downgraded world).
    – Skylinerw
    Jun 8, 2016 at 2:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .