Scoreboards: मानदंड जो स्वचालित रूप से चीज़ों को ट्रैक करते हैं, और डिस्प्ले स्लॉट
अधिकांश scoreboard ट्यूटोरियल केवल dummy का उपयोग करते हैं। अंतर्निहित मानदंड बिना किसी कमांड के मौतों, तोड़े गए ब्लॉकों और कस्टम आँकड़ों को ट्रैक करते हैं — यहाँ इसका पूरा विवरण है।
dummy is the criterion everyone learns, and it is the one that does nothing on its own. The interesting ones update themselves.
एक objective बनाना
/scoreboard objectives add Deaths deathCount "Times died"
deathCount is the criterion. The quoted part is the display name and is optional.
मानदंड जो स्वयं ट्रैक करते हैं
| मानदंड | तब बढ़ता है जब |
|---|---|
deathCount | खिलाड़ी मरता है |
playerKillCount | वे किसी खिलाड़ी को मारते हैं |
totalKillCount | वे किसी भी जीव को मारते हैं |
health | लगातार — 0 से 20 |
food, air, armor, xp, level | लगातार |
dummy | कभी नहीं — केवल /scoreboard players set |
trigger | कभी नहीं, लेकिन खिलाड़ी इसे इसके ज़रिए बदल सकते हैं /trigger |
trigger is the useful one for menus: a normal player cannot run /scoreboard players set, but they can run /trigger, which lets you build clickable menus that work without op.
Statistic मानदंड बहुत विस्तृत हैं
/scoreboard objectives add Mined minecraft.mined:minecraft.diamond_ore
/scoreboard objectives add Walked minecraft.custom:minecraft.walk_one_cm
/scoreboard objectives add Jumps minecraft.custom:minecraft.jump
गेम द्वारा पहले से ट्रैक किया जाने वाला कोई भी आँकड़ा बिना किसी टिकिंग फ़ंक्शन के एक objective चला सकता है। इसके प्रकार हैं minecraft.mined, minecraft.crafted, minecraft.used, minecraft.broken, minecraft.picked_up, minecraft.dropped, minecraft.killed, minecraft.killed_by and minecraft.custom.
ध्यान दें कि दूरी वाले मान इसमें होते हैं सेंटीमीटर — walk_one_cm divided by 100 is blocks.
डिस्प्ले स्लॉट
/scoreboard objectives setdisplay sidebar Deaths
/scoreboard objectives setdisplay list Deaths
/scoreboard objectives setdisplay below_name Deaths
sidebar— दायाँ पैनल, शीर्ष 15 प्रविष्टियाँlist— टैब सूची में नामों के आगेbelow_name— खिलाड़ी के नेमटैग के नीचे तैरता हुआ
Sidebar में टीम के रंग का प्रत्यय (suffix) भी लगता है — sidebar.team.red — showing that objective only to players on that team. That is how one server shows different scores to different teams.
कमांड में मान पढ़ना
/execute store result score @s Temp run data get entity @s Pos[1]
/execute if score @s Deaths matches 5.. run say five or more
matches takes a range: 5, 5.., ..5, 1..10. This is the standard way to branch on a score, and it is why store result matters — it is the bridge between world data and scoreboard arithmetic.
सफ़ाई करना
Objectives हमेशा के लिए world फ़ाइल में बने रहते हैं। /scoreboard objectives remove <name> when a map is finished, otherwise a heavily-iterated datapack leaves dozens of dead objectives that still tick.
प्रत्येक gamerule अपने डिफ़ॉल्ट मान के साथ, साथ ही scoreboard आँकड़े और गेम-इवेंट आवृत्तियाँ, इसमें सूचीबद्ध हैं संदर्भ और कैलकुलेटर — सेट 4.