/debugpath
< Commands
Not to be confused with Commands/debugmobspawning or Commands/debugpath.
This feature is exclusive to Java Edition.
This feature is intended for debugging purposes only, and should not be used during normal play. It might cause crashes and corrupt world saves.
/debugpath| Permission level required |
2 |
|---|---|
| Restrictions |
|
{
"title": "<code>/debugpath</code>",
"rows": [
{
"field": "2",
"label": "(link to Permission level article, displayed as Permission level<br>required)"
},
{
"field": "<code>-DMC_DEBUG_DEV_COMMANDS</code> (link to debug property article, displayed as debug property)",
"label": "(link to Commands#Restrictions article, displayed as Restrictions)"
}
],
"invimages": [],
"images": []
}
/debugpath is a command that can be enabled with the debug property -DMC_DEBUG_DEV_COMMANDS. It attempts to create a path for a mob to a specified position.
Syntax
debugpath <to>
- If the executor is a mob, attempts to create a path for that mob to the specified position, using its pathfinding algorithm. This does not cause the mob to try to pathfind to that position; it simply tests if such a path can be made.
Arguments
<to>: block_pos
- Specifies the block position the mob will attempt to pathfind to.
- Must be a block position composed of
<X>,<Y>and<Z>, each of which must be an integer or a tilde and caret notation.
Result
| Command | Trigger | Java Edition |
|---|---|---|
| Any | The command is incomplete, or any argument is not specified correctly. | Unparseable |
| The executor of the command is not a mob (i.e. it's a player, a mannequin, a command block, or the server itself). | Failed | |
| A path from the execution position to the specified block position could not be made. | ||
| The created path cannot be followed by the mob, due to obstacles. | ||
| Otherwise | Successful |
Output
| Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
|---|---|---|---|---|---|
| Any | Java Edition | On fail | 0 | 0 | 0 |
| On success | 1 | 1 | 1 |
History
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.21.9 | Pre-Release 1 | Added debug property -DMC_DEBUG_DEV_COMMANDS, making the command accessible in the vanilla game. | |||||