运输矿车指令
minecraft:chest_minecart英文名 Minecart with Chest
运输矿车(minecraft:chest_minecart)不能堆叠,一格只能放 1 个。下面是常用的给予、清除和检测命令,点“复制”就能用。
常用命令
给最近的玩家 1 个运输矿车
/give @p minecraft:chest_minecart
给所有玩家
/give @a minecraft:chest_minecart
金色的名字
/give @p chest_minecart[custom_name={translate:"item.minecraft.chest_minecart",color:"gold",italic:false}]想换成自己起的名字,把 translate 那段改成普通文字
清除玩家身上所有运输矿车
/clear @p minecraft:chest_minecart
检测手里是否拿着运输矿车
/execute as @a if items entity @s weapon.mainhand minecraft:chest_minecart run title @s actionbar ["",{text:"✔ ",color:"green"},{translate:"item.minecraft.chest_minecart"}]基本信息
- 物品 ID
- minecraft:chest_minecart
- 最大堆叠
- 1
- 类型
- 物品
同类物品
数据来自 Minecraft Java 26.3 官方数据,命令都经过 26.3 语法检查。