陷阱箱指令
minecraft:trapped_chest英文名 Trapped Chest
陷阱箱(minecraft:trapped_chest)最多堆叠 64 个。下面是常用的给予、放置、清除和检测命令,点“复制”就能用。
常用命令
给最近的玩家 1 个陷阱箱
/give @p minecraft:trapped_chest
给一组(64 个)
/give @p minecraft:trapped_chest 64
给所有玩家
/give @a minecraft:trapped_chest
金色的名字
/give @p trapped_chest[custom_name={translate:"block.minecraft.trapped_chest",color:"gold",italic:false}]想换成自己起的名字,把 translate 那段改成普通文字
在脚下放一个
/setblock ~ ~ ~ minecraft:trapped_chest
铺一片 5×5
/fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 minecraft:trapped_chest
会替换脚下那一层方块
清除玩家身上所有陷阱箱
/clear @p minecraft:trapped_chest
检测手里是否拿着陷阱箱
/execute as @a if items entity @s weapon.mainhand minecraft:trapped_chest run title @s actionbar ["",{text:"✔ ",color:"green"},{translate:"block.minecraft.trapped_chest"}]基本信息
- 物品 ID
- minecraft:trapped_chest
- 最大堆叠
- 64
- 类型
- 方块(可以放置)
同类物品
数据来自 Minecraft Java 26.3 官方数据,命令都经过 26.3 语法检查。