The Best Resource for Minecraft
The Best Resource for Minecraft

Laadt je datapack niet? De mapstructuur en de drie namen die moeten overeenkomen

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:

  1. pack.mcmeta at the pack root — naast data/, not inside it.
  2. data/<namespace>/ — je namespace, kleine letters, geen spaties. Dit wordt het voorvoegsel

in my_namespace:my_function.

  1. 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:

OudHuidig
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

  1. /datapack list — if the pack is not listed at all, pack.mcmeta is missing,

onjuist geformatteerd, of één niveau te diep.

  1. In de lijst, maar uitgeschakeld/datapack enable "file/my_pack". Note the file/ prefix

en de aanhalingstekens.

  1. In de lijst en ingeschakeld, maar inactief — verkeerde pack_format, or plural folder names.
  2. /reload and 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.

Probeer de tool: Datapack Studio →