Java; training package strictly for release 1.21 · 3 min read

Installing a Java 26.3 data pack: pack.mcmeta and your first function

data pack is installed in the world folder, and its pack.mcmeta is in the root of the package. Let's create a minimal package for Java 26.3 with the function demo:hello; after loading it will send one verification message.

LonelyCraft editors · Updated

Desktop with computer and world Minecraft on screen
Illustration: desktop with a computer and world Minecraft on the screen. This is an artistic scene, not a snapshot of a specific server.

Open the folder of the desired world

In the Java client: “Single player” → select world → “Customize” → “Open world folder”. Close world before copying. On the server, look for the level-name value in server.properties and the corresponding world directory.

Create datapacks/demo in it. Inside there will be pack.mcmeta and data/demo/function/hello.mcfunction. For ZIP, pack.mcmeta should also be located immediately in the root, and not under the external demo folder.

File tree world/datapacks/demo with pack.mcmeta and hello.mcfunction
The namespace is taken from the demo folder inside data, the function name is taken from hello.mcfunction.Scroll the diagram horizontally.Open full-size diagram

Declare compatibility with 26.3

The official release 26.3 specifies the data pack format 121.0. The min_format/max_format range scheme is introduced in Java1.21.9. Save the resulting JSON as datapacks/demo/pack.mcmeta.

This is a narrow example of 26.3. For an older release, do not copy the number 121: compatibility is also determined by the command and data structure. Enable display of file extensions to avoid pack.mcmeta.txt.

{
  "pack": {
    "description": "Проверка demo:hello для Java26.3",
    "min_format": [121, 0],
    "max_format": [121, 0]
  }
}

Create and execute a function

In data/demo/function/hello.mcfunction, write the following line without the leading slash. Open world with commands enabled or use the server console. Execute /datapack list enabled, then /function demo:hello. On Paper in the console, commands are written without a slash.

If you added files while the server was running, vanilla data reload is /minecraft:reload; it is not a way to update JAR plugins. After reload, read the log, then retry the function. The Datapack loaded message is expected.

say Datapack loaded

Determine at what level the package failed to load

The package is not listed - check the correct world, ZIP root and pack.mcmeta syntax. The package exists, the function is unknown - check the namespace demo, singular function, name and extension .mcfunction. Don't use the functions folder from the old example.

Before installing a generation or command that changes world, save a copy. Removing a package will remove definitions, but will not cancel already delivered blocks and created chunks.

Full refund requires condition prior to package application. Save world before changing data.

Correct JSON or YAML does not prove content compatibility. Separate syntax from the meaning of settings.

Frequently asked questions

Does every client need this package?

A normal server function runs in the world server. Additional textures are distributed separately as a resource pack.

Does changing the format automatically update the command?

No. Metadata declares compatibility but does not transform the contents of the package.

Why is the function not called from ZIP?

A common reason is that pack.mcmeta lies a level deeper than the archive root. Check the structure first, then the log message.

Views: … · One view per browser per day

Was this useful?Total score: …

One reaction per browser. Click again to remove it, or choose the other reaction.

Sources and documentation

constructionhowinstall

Read on

Installing data pack Java 26.3: pack.mcmeta and first function - LonelyCraft — Lonely Craft