Laadt je datapack niet? De mapstructuur en de drie namen die moeten overeenkomen
Een datapack dat niet verschijnt in /datapack list heeft een padprobleem, geen codeprobleem. Hier is de exacte structuur, de namespace-regel en de mappen die zijn hernoemd.
/datapack list shows nothing, or shows the pack as disabled. Almost always the JSON is fine and the folders are wrong.
De boomstructuur
world/datapacks/my_pack/
├── pack.mcmeta
└── data/
└── my_namespace/
├── function/ one .mcfunction per file
├── recipe/
├── loot_table/
├── advancement/
├── predicate/
└── tags/
└── function/
└── load.json
Drie namen moeten overeenkomen en eentje daarvan ligt niet voor de hand:
pack.mcmetaat the pack root — naastdata/, not inside it.data/<namespace>/— je namespace, kleine letters, geen spaties. Dit wordt het voorvoegsel
in my_namespace:my_function.
- De namen van de categoriemappen, die zijn veranderd en meestal de boosdoener zijn.
De mappen zijn hernoemd naar enkelvoud
Dit maakte veel packs en veel tutorials kapot:
| Oud | Huidig |
|---|---|
functions/ | function/ |
recipes/ | recipe/ |
loot_tables/ | loot_table/ |
advancements/ | advancement/ |
predicates/ | predicate/ |
structures/ | structure/ |
Een pack met de meervoudsnamen laadt wel — het verschijnt in /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.
Iets automatisch uitvoeren
Twee speciale tags:
data/minecraft/tags/function/load.json → runs once on load/reload
data/minecraft/tags/function/tick.json → runs every tick
Let op data/minecraft/, niet je eigen namespace — de tag is van Minecraft, de functies waarnaar deze verwijst zijn van jou:
{ "values": ["my_namespace:setup"] }
Diagnose op volgorde
/datapack list— if the pack is not listed at all,pack.mcmetais missing,
onjuist geformatteerd, of één niveau te diep.
- In de lijst, maar uitgeschakeld —
/datapack enable "file/my_pack". Note thefile/prefix
en de aanhalingstekens.
- In de lijst en ingeschakeld, maar inactief — verkeerde
pack_format, or plural folder names. /reloadand read the chat. Syntax errors in functions surface there, not silently.
Gezipt of niet
Beide werken. Gezipt betekent pack.mcmeta at the zip-root, precies zoals bij resourcepacks. Mapvorm is makkelijker tijdens het ontwikkelen omdat /reload picks up edits without re-zipping.
Serverplaatsing
Op een server is het pad <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.
Stel een pack samen met de huidige mapnamen, een geldige pack.mcmeta and a load tag already wired, then download it ready to drop in, with the Datapack Studio.