How do I locate command blocks? [duplicate]

How do I locate command blocks? [duplicate] - Unrecognizable woman holding paw of dog

How do I locate command blocks? I was messing around with some commands and died, and lost the location where I was testing out a lot of stuff. I do not have access to MCEdit or anything like that. I accidentally took a screenshot, but didn't have co-ords up, if that helps.



Best Answer

As long as you remember any semi-unique part of your command1, you can use NBTExplorer.

Command Blocks are Tile/Block Entities, since a regular data value is not enough to store all information about them. Instead, they have NBT data similar to entities, which are detailed on the wiki. In particular, command blocks ("Control") have a Command entry. NBTExplorer is able to read the region format and search for a Tile Entity with a specific entry.

  1. Open up the program and select File > Open Minecraft Save Folder2. You will get a list of folders corresponding to your worlds. Open up the world you want to search, and select the "Region" folder.

  2. Go to Search > Find (Ctrl+F). In the popup, under Name, enter "Command", and set Value to your code snippet. For example, I remember testing something on Pigs a while back, and I know that I used type=Pig in one or more commands in that contraption.

    enter image description here

  3. Click on Find and wait. If you remember your command snippet correctly, the program will find the corresponding Tile Entity. First of all, it shows you the exact command used. If that is not what you want, go to Search > Find Next (F3) and repeat this step. It also shows you the xyz coordinates of the block, which you can use to teleport yourself to the command block in game.

    enter image description here

This method can be used to locate all Tile Entities and regular Entities in a savegame, as long as you have sufficiently unique NBT data for it. For example, you can use it to locate that Chest that you put your "Gunblade" in (Items, name:Gunblade), or figure out where your horse of yours has wandered off to (OwnerUUID, [your UUID] or Tame, 1).

1 Meaning there shouldn't be too many command blocks including that snippet.

2 If you have set a different Game Directory for your Minecraft profile, select *Open Folder" and navigate to your saves manually.




Pictures about "How do I locate command blocks? [duplicate]"

How do I locate command blocks? [duplicate] - Side view of young woman in hoodie sitting on floor near sofa and playing with obedient brown Labrador while resting during free time
How do I locate command blocks? [duplicate] - Crop hacker silhouette typing on computer keyboard while hacking system
How do I locate command blocks? [duplicate] - Full body optimistic young female with curly hair smiling and teaching Beagle dog beg command on sunny summer day in countryside



Is there a way to locate command blocks?

Open the chat box by pressing T on your keyboard, or the right d-pad button on a controller. In place of "[your username]," insert your Minecraft username. 4. The command block will appear in your inventory.

How do you get rid of repeating command blocks?

Go into your world settings. Scroll down to the cheats section and you should see "Command Blocks enabled" or something like that. Flick that off and the command block should stop. If you don't want your chat to be spammed like that, type /gamerule commandblockoutput false .

Can you duplicate command blocks?

To copy the entirety of a certain Command block or Text press Ctrl+A to select it all then Ctrl+C to copy it. Might be quicker than pressing shift and going over 280 characters. Oh and after you hit Ctrl+A you can use shift+Left or Right Arrow Key to adjust what is selected.

What command spawns command blocks?

To access the command blocks you must be an operator on the server/realm and in creative mode. It cannot be found in your creative inventory. You will need to spawn it in from by typing /give <your username> command_block.



How to Copy and Paste in command blocks




More answers regarding how do I locate command blocks? [duplicate]

Answer 2

You cannot.


Your screenshot won't help if there is no co-ordinates on it.


You can use a map renderer to (hopefully) find your command block though, like Minecraft Overviewer or MCEdit.

Answer 3

You could download X-Rays or something and turn them on... But make sure your render distance is on a very far amount.

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Ivan Babydov, Ivan Babydov, Anete Lusina, Blue Bird