डेटापैक लोड नहीं हो रहा? फ़ोल्डर संरचना और वे तीन नाम जिनका मेल खाना ज़रूरी है
/datapack list में न दिखने वाले डेटापैक में पाथ की समस्या होती है, कोड की नहीं। यहाँ सटीक ट्री, नेमस्पेस नियम, और वे फ़ोल्डर दिए गए हैं जिनका नाम बदला गया था।
/datapack list shows nothing, or shows the pack as disabled. Almost always the JSON is fine and the folders are wrong.
ट्री
world/datapacks/my_pack/
├── pack.mcmeta
└── data/
└── my_namespace/
├── function/ one .mcfunction per file
├── recipe/
├── loot_table/
├── advancement/
├── predicate/
└── tags/
└── function/
└── load.json
तीन नामों का मेल खाना ज़रूरी है और उनमें से एक स्पष्ट नहीं है:
pack.mcmetaat the pack root — बगल मेंdata/, not inside it.data/<namespace>/— आपका नेमस्पेस, लोअरकेस, बिना स्पेस के। यह प्रीफ़िक्स बनता है
में my_namespace:my_function.
- श्रेणी फ़ोल्डर के नाम, जो बदल गए थे और आमतौर पर यही मुख्य कारण होते हैं।
फ़ोल्डरों का नाम बदलकर एकवचन कर दिया गया था
इसकी वजह से कई सारे पैक्स और ट्यूटोरियल्स काम करना बंद कर गए:
| पुराना | वर्तमान |
|---|---|
functions/ | function/ |
recipes/ | recipe/ |
loot_tables/ | loot_table/ |
advancements/ | advancement/ |
predicates/ | predicate/ |
structures/ | structure/ |
बहुवचन नामों का उपयोग करने वाला पैक लोड होता है — यह इसमें दिखाई देता है /datapack list — and simply does nothing, which is the most confusing failure mode of the set. tags/ stayed plural, and so did tags/function/ becoming singular inside it. Yes, that is inconsistent.
कुछ स्वचालित रूप से चलाना
दो विशेष टैग:
data/minecraft/tags/function/load.json → runs once on load/reload
data/minecraft/tags/function/tick.json → runs every tick
नोट data/minecraft/, आपका अपना नेमस्पेस नहीं — टैग Minecraft का है, जिन फ़ंक्शन्स की ओर यह इंगित करता है वे आपके हैं:
{ "values": ["my_namespace:setup"] }
क्रमवार निदान करना
/datapack list— if the pack is not listed at all,pack.mcmetais missing,
विकृत, या एक स्तर बहुत गहरा।
- सूचीबद्ध लेकिन अक्षम —
/datapack enable "file/my_pack". Note thefile/prefix
और कोट्स।
- सूचीबद्ध और सक्षम लेकिन निष्क्रिय — गलत
pack_format, or plural folder names. /reloadand read the chat. Syntax errors in functions surface there, not silently.
Zipped या नहीं
दोनों काम करते हैं। Zipped का अर्थ है pack.mcmeta at the zip रूट, बिल्कुल रिसोर्स पैक्स की तरह। डेवलपमेंट के दौरान फ़ोल्डर-रूप आसान होता है क्योंकि /reload picks up edits without re-zipping.
सर्वर प्लेसमेंट
सर्वर पर पाथ यह है <world>/datapacks/, where <world> is the value of level-name in server.properties — not the server root. Dropping the pack in the server folder is the single most common server-side mistake.
वर्तमान फ़ोल्डर नामों और एक मान्य के साथ पैक तैयार करें pack.mcmeta and a load tag already wired, then download it ready to drop in, with the Datapack Studio.