Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Minecart with Command Block: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Remove broken links to missing pages
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
(One intermediate revision by the same user not shown)
Line 17: Line 17:
}}
}}


A '''minecart with command block''' is an impulse{{only|java|short=1}} or repeating{{only|bedrock|education|short=1}} command block inside a [[Minecraft:minecart]].
A '''minecart with command block''' is an impulse{{only|java|short=1}} or repeating{{only|bedrock|education|short=1}} [[Minecraft:command block]] inside a [[Minecraft:minecart]].


== Obtaining ==
== Obtaining ==


The minecart with command block is obtainable only using the command {{cmd|give @s command_block_minecart}}, as it does not appear in the creative inventory{{only|BE}} and has no [[Minecraft:crafting]] recipe. It can also be summoned using the command {{cmd|summon command_block_minecart}}. It can be broken like any other minecart, but only the minecart is retained, while the command block is lost.
The minecart with command block is obtainable only using the [[Minecraft:command]] {{cmd|give @s command_block_minecart}}, as it does not appear in the creative inventory{{only|BE}} and has no [[Minecraft:crafting]] recipe. It can also be summoned using the command {{cmd|summon command_block_minecart}}. It can be broken like any other minecart, but only the minecart is retained, while the command block is lost.


Unlike most [[Minecraft:minecart]] types, command block minecarts can't be crafted with a [[Minecraft:minecart]] and a command block.
Unlike most [[Minecraft:minecart]] types, command block minecarts can't be crafted with a [[Minecraft:minecart]] and a [[Minecraft:command block]].


== Usage ==
== Usage ==
{{main|Command Block}}
{{main|Command Block}}
The minecart with command block combines the functionalities of both minecarts and command blocks. Although the minecart visually contains an impulse command block, it functions more similarly to a repeating command block, executing the command once every four game [[Minecraft:tick]]s (unlike a repeating command block that repeats every 1 game tick) when on an active activator rail. When it passes over a detector rail with a comparator connected next to it, it outputs the command block's success count value.
The minecart with command block combines the functionalities of both minecarts and command blocks. Although the minecart visually contains an impulse command block in ''Java Edition'', it functions more similarly to a repeating command block, executing the command once every four game [[Minecraft:tick]]s (unlike a repeating command block that repeats every 1 game tick) when on an active [[Minecraft:activator rail]]. When it passes over a [[Minecraft:detector rail]] with a [[Minecraft:comparator]] connected next to it, it outputs the command block's success count value.


The command is executed at the [[Minecraft:coordinates]] of the minecart, which can of course move, allowing for command execution relative to an entity without the {{cmd|execute}} command.
The command is executed at the [[Minecraft:coordinates]] of the minecart, which can of course move, allowing for command execution relative to an entity without the {{cmd|execute}} command.
Line 33: Line 33:
== Sounds ==
== Sounds ==
{{Edition|Java}}:<br>
{{Edition|Java}}:<br>
Minecarts with command blocks use the Friendly Creatures sound category for entity-dependent sound events.<ref group="sound" name="rollsource">{{bug|MC-42132}}</ref>
Minecarts with command blocks use the Friendly Creatures sound category for [[Minecraft:Sound#Entity-dependent categories|entity-dependent sound events]].<ref group="sound" name="rollsource">{{bug|MC-42132}}</ref>


{{SoundTable
{{SoundTable
Line 122: Line 122:
** {{nbt inherit/vehicle}}
** {{nbt inherit/vehicle}}
** {{nbt|string|Command}}: The command entered into the minecart.
** {{nbt|string|Command}}: The command entered into the minecart.
** {{nbt|string|LastOutput}}: The last line of output generated by the minecart. Still stored even if the gamerule commandBlockOutput is false. Appears in the GUI of the minecart when right-clicked, and includes a timestamp of when the output was produced.
** {{nbt|string|LastOutput}}: The last line of output generated by the minecart. Still stored even if the [[Minecraft:gamerule]] commandBlockOutput is false. Appears in the GUI of the minecart when right-clicked, and includes a timestamp of when the output was produced.
** {{nbt|int|SuccessCount}}: Represents the strength of the analog signal output by redstone comparators attached to this minecart. Only updated when the minecart is activated with an activator rail.
** {{nbt|int|SuccessCount}}: Represents the strength of the analog signal output by redstone comparators attached to this minecart. Only updated when the minecart is activated with an activator rail.
** {{nbt|bool|TrackOutput}}: {{cd|1}} or {{cd|0}} ({{cd|true}}/{{cd|false}}) - Determines whether the LastOutput is stored. Can be toggled in the GUI by clicking a button near the "Previous Output" textbox. Caption on the button indicates current state: "O" if true,"X" if false.
** {{nbt|bool|TrackOutput}}: {{cd|1}} or {{cd|0}} ({{cd|true}}/{{cd|false}}) - Determines whether the LastOutput is stored. Can be toggled in the GUI by clicking a button near the "Previous Output" textbox. Caption on the button indicates current state: "O" if true,"X" if false.
Line 138: Line 138:
|{{HistoryLine|||dev=15w35a|[[File:Minecart with Command Block JE3.png|32px]] The texture of the command block has been changed.}}
|{{HistoryLine|||dev=15w35a|[[File:Minecart with Command Block JE3.png|32px]] The texture of the command block has been changed.}}
|{{HistoryLine||1.14|dev=18w43a|[[File:Minecart with Command Block JE4.png|32px]] [[File:Minecart with Command Block (item) JE2 BE3.png|32px]] The textures of the minecart with command block has been changed.}}
|{{HistoryLine||1.14|dev=18w43a|[[File:Minecart with Command Block JE4.png|32px]] [[File:Minecart with Command Block (item) JE2 BE3.png|32px]] The textures of the minecart with command block has been changed.}}
|{{HistoryLine||1.17|dev=21w20a|The rarity of minecarts with command block has been changed from "Common" to "Epic".}}
|{{HistoryLine||1.17|dev=21w20a|The [[Minecraft:rarity]] of minecarts with command block has been changed from "Common" to "Epic".}}
|{{HistoryLine||1.19.3|dev=22w44a|Minecart with command block is now available in the creative inventory, but only if cheats are enabled.}}
|{{HistoryLine||1.19.3|dev=22w44a|Minecart with command block is now available in the creative inventory, but only if cheats are enabled.}}
|{{HistoryLine|||dev=22w45a|Moved the minecart with command block behind the Operator Utilities tab in the creative inventory. The tab is only available if cheats are enabled and the "Operator Items Tab" option in the controls menu is turned on.}}
|{{HistoryLine|||dev=22w45a|Moved the minecart with command block behind the Operator Utilities tab in the creative inventory. The tab is only available if cheats are enabled and the "Operator Items Tab" option in the controls menu is turned on.}}
Line 146: Line 146:
{{HistoryTable
{{HistoryTable
|{{HistoryLine|pocket}}
|{{HistoryLine|pocket}}
|{{HistoryLine||1.0.5|dev=alpha 1.0.5.0|[[File:Minecart with Command Block BE1.png|32px]] [[File:Minecart with Command Block (item) BE1.png|32px]] Added minecart with command block. The [[Minecraft:minecart]] has a repeating command block in it, instead of an impulse command block.}}
|{{HistoryLine||1.0.5|dev=alpha 1.0.5.0|[[File:Minecart with Command Block BE1.png|32px]] [[File:Minecart with Command Block (item) BE1.png|32px]] Added minecart with command block. The [[Minecraft:minecart]] has a [[Minecraft:repeating command block]] in it, instead of an impulse command block.}}
|{{HistoryLine|bedrock}}
|{{HistoryLine|bedrock}}
|{{HistoryLine||1.10.0|dev=beta 1.10.0.3|[[File:Minecart with Command Block BE2.png|32px]] [[File:Minecart with Command Block (item) JE2 BE3.png|32px]] The texture of the minecart with command block has been changed. The item texture has also been changed to match {{el|je}}'s.<ref>{{bug|MCPE-42990}}</ref>}}
|{{HistoryLine||1.10.0|dev=beta 1.10.0.3|[[File:Minecart with Command Block BE2.png|32px]] [[File:Minecart with Command Block (item) JE2 BE3.png|32px]] The texture of the minecart with command block has been changed. The item texture has also been changed to match {{el|je}}'s.<ref>{{bug|MCPE-42990}}</ref>}}
Line 161: Line 161:
{{HistoryTable
{{HistoryTable
|{{HistoryLine|java}}
|{{HistoryLine|java}}
|{{HistoryLine||1.11|dev=16w32a|The entity ID has been changed from <code>MinecartCommandBlock</code> to <code>commandblock_minecart</code>.}}
|{{HistoryLine||1.11|dev=16w32a|The [[Minecraft:entity]] ID has been changed from <code>MinecartCommandBlock</code> to <code>commandblock_minecart</code>.}}
|{{HistoryLine||1.13|dev=17w47a|Prior to ''The Flattening'', this item's numeral ID was 422.{{info needed|and the entity's was what?}}}}
|{{HistoryLine||1.13|dev=17w47a|Prior to [[Minecraft:1.13/Flattening|''The Flattening'']], this item's numeral ID was 422.{{info needed|and the entity's was what?}}}}
|{{HistoryLine|||dev=pre5|The entity ID has been changed to <code>command_block_minecart</code>.}}
|{{HistoryLine|||dev=pre5|The entity ID has been changed to <code>command_block_minecart</code>.}}
}}
}}
Line 179: Line 179:
=== Screenshots ===
=== Screenshots ===
<gallery>
<gallery>
Minecart with command block 13w39b.png|A minecart with command block in 1.16.4.
Minecart with command block 13w39b.png|A minecart with command block in [[Minecraft:1.16.4]].
Red bucket with air.png|A minecart command block testing the block in the red area with [[Minecraft:air]].
Red bucket with air.png|A minecart command block testing the block in the red area with [[Minecraft:air]].
</gallery>
</gallery>
Line 192: Line 192:
[[Category:Vehicles]]
[[Category:Vehicles]]


de:Befehlsblocklore
[[Minecraft:de:Befehlsblocklore]]
fr:Wagonnet à bloc de commande
[[Minecraft:fr:Wagonnet à bloc de commande]]
it:Carrello da miniera
[[Minecraft:it:Carrello da miniera]]
ja:コマンドブロック付きのトロッコ
[[Minecraft:ja:コマンドブロック付きのトロッコ]]
nl:Mijnkar met opdrachtblok
[[Minecraft:nl:Mijnkar met opdrachtblok]]
pl:Wagonik z blokiem poleceń
[[Minecraft:pl:Wagonik z blokiem poleceń]]
pt:Carrinho de mina com bloco de comando
[[Minecraft:pt:Carrinho de mina com bloco de comando]]
ru:Вагонетка с командным блоком
[[Minecraft:ru:Вагонетка с командным блоком]]
uk:Вагонетка з командним блоком
[[Minecraft:uk:Вагонетка з командним блоком]]
zh:命令方块矿车
[[Minecraft:zh:命令方块矿车]]

Latest revision as of 11:16, 12 April 2026

Template:For Template:Infobox item entity

A minecart with command block is an impulseTemplate:Only or repeatingTemplate:Only Minecraft:command block inside a Minecraft:minecart.

Obtaining

The minecart with command block is obtainable only using the Minecraft:command Template:Cmd, as it does not appear in the creative inventoryTemplate:Only and has no Minecraft:crafting recipe. It can also be summoned using the command Template:Cmd. It can be broken like any other minecart, but only the minecart is retained, while the command block is lost.

Unlike most Minecraft:minecart types, command block minecarts can't be crafted with a Minecraft:minecart and a Minecraft:command block.

Usage

Template:Main The minecart with command block combines the functionalities of both minecarts and command blocks. Although the minecart visually contains an impulse command block in Java Edition, it functions more similarly to a repeating command block, executing the command once every four game Minecraft:ticks (unlike a repeating command block that repeats every 1 game tick) when on an active Minecraft:activator rail. When it passes over a Minecraft:detector rail with a Minecraft:comparator connected next to it, it outputs the command block's success count value.

The command is executed at the Minecraft:coordinates of the minecart, which can of course move, allowing for command execution relative to an entity without the Template:Cmd command.

Sounds

Template:Edition:
Minecarts with command blocks use the Friendly Creatures sound category for entity-dependent sound events.<ref group="sound" name="rollsource">Template:Bug</ref>

Template:SoundTable

Template:Edition: Template:SoundTable

Data values

ID

Template:Edition: Template:ID table Template:ID table

Template:Edition: Template:ID table Template:ID table

Entity data

Minecarts with command blocks have entity data associated with them that contain various properties of the entity.

Template:El: Template:Main

<section begin="entity data"/>

<section end="entity data"/>

Template:El:

See Minecraft:Bedrock Edition level format/Entity format.

History

Java Edition

Template:HistoryTable

Bedrock Edition

Template:HistoryTable

Legacy Console Edition

Template:HistoryTable

Data history

Java Edition

Template:HistoryTable

Bedrock Edition

Template:HistoryTable

Issues

Template:Issue list

Gallery

Screenshots

References

Template:Reflist

Navigation

Template:Navbox items Template:Navbox entities

Minecraft:de:Befehlsblocklore Minecraft:fr:Wagonnet à bloc de commande Minecraft:it:Carrello da miniera Minecraft:ja:コマンドブロック付きのトロッコ Minecraft:nl:Mijnkar met opdrachtblok Minecraft:pl:Wagonik z blokiem poleceń Minecraft:pt:Carrinho de mina com bloco de comando Minecraft:ru:Вагонетка с командным блоком Minecraft:uk:Вагонетка з командним блоком Minecraft:zh:命令方块矿车