This might not be possible, but i wanted to see if anybody had an answer before i tried something else.

So in one of my worlds, i have a Minecart Command block which, gets triggered as it rides round a track, but is there a way to actually Test For it existing?

I have tried /testfor @e[type=MinecartCommandBlock]

But it just outputs[00:44:19] Unknown command. Try /help for a list of commands. When it works just fine in the in-game console: Found entity.Minecart.Command.Block.name

Does anybody know a way to solve or know of a way around this?

  • are you sure you typed the command in the command block correct? – ModDL Oct 28 '14 at 1:03
  • The command i used in the post is exactly what i put into the command block. – EpicMineC Oct 28 '14 at 1:05
  • It should work fine. Make sure you are copying the command correctly (no spaces before). – SirBenet Oct 28 '14 at 1:10
  • I checked, no extra spaces, no other characters or misspelled words. I just don't understand i have been trying to figure it out for about an hour and a half. I have had a similar problem before, just like this where the command block just would not accept the command, in the end i just left it. – EpicMineC Oct 28 '14 at 1:14
  • 1
    @EpicMineC Please submit as the answer that worked for you. – user271360 Oct 28 '14 at 1:50

This command should work. If the time is always the same in the output and doesn't change, the command might be succeeding but not outputting to the console. Try using a comparator directly next to the command block to check whether it is finding the Minecart Command Block. If the comparator is lit, the command is succeeding. If the comparator is not lit, the command is either incorrect or the block could not find the entity you're looking for. If it continues outputting

[00:44:19] Unknown command. Try /help for a list of commands

then try opening the command block, pressing CTRL + A to highlight all, then pressing CTRL + C to copy. Next, break the block and place a new one, then open this new block and do CTRL + V to paste. Sometimes when I have this problem it helps to "reset" the block in this way.

| improve this answer | |

You will need to use the appropriate name of the block/item dependant on your Minecraft Version.

Minecraft 1.11 and Later

Now, I'm going to assume that you are using the newest version yet, Minecraft 1.11.2 .
If so, perfect.

You'll want to modify your command so it looks a bit like this:

/testfor @e[type=Commandblock_minecart,r=5]

The Radius-Parameter isn't necessary, but useful for when you are in an area hosting many Command-Block-Minecarts (As you'll be able to detect and maybe get rid of the ones you don't need with the Radius-Parameter).



... bit, is to specify that It Is Indeed a Command-Block-Minecart; the new ID was introduced in the early 1.11 Release (Snapshot 16w32a), because... well, Mojang haven't specified a reason yet, but it's assumable that it's to prevent typos.
Link to the Gamepedia-Wiki page on it: Command Block Minecarts

(Note: that the capitalisation of 'Command' is in place by standard. If it does not work for you, change the first letter to a lowercase 'c'. That goes for all items/blocks referenced in commands.)

Minecraft 1.10 and Versions Before

If your version is, as said above, 1.10 or before, you'll have to use the original in-place name for it:


... and in a /testfor command:

/testfor @e[type=MinecartCommandBlock,r=5]

Again, the Radius-Parameter isn't necessary, I regularly insert them for clarity and by-tradition.

(Second Note: The ' /testfor '-Command is only present in Minecraft Versions 1.5 (Snapshot 13w03a) and Higher!)


In short, different names are used to improve readability, portability and general mark-up.

' commandblock_minecart ' for Minecraft 1.11 and Later,


' MinecartCommandBlock ' for Minecraft 1.5 to 1.10 .

I hope my answer has helped solve your conundrum.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.