Minecraft 興趣開發 | 指令筆記

運行之後會自動創建一個名字爲namespace的存儲空間,存入:a:1b

 /data merge storage minecraft:namespace {a:1b}   

創建挖掘榜計分板,id是dig,顯示名稱是'ABC挖掘榜'

 /scoreboard objectives add dig minecraft.used:minecraft.netherite_pickaxe "ABC挖掘榜" 

將計分板顯示在屏幕右側

 /scoreboard objectives setdisplay sidebar dig 

獲取玩家實體nbt數據

 /data get entity 玩家ID 

檢測玩家揹包是否存在指定物品

 /execute if entity @a[nbt={Inventory:[{id:"minecraft:netherite_ingot"}]}] if entity 玩家id 

移除玩家揹包指定物品

 /clear GreatMingCtu minecraft:netherite_ingot 

給玩家計分板加分

 /scoreboard players add GreatMingCtu death 1 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章