dataLib
ModAbout Advanced Minecraft Java datapack library for storage, predicates, events, and utilities. Topics minecraft
Type
Mod
Modrinth Downloads
147
Modrinth ID
jYMa7nhW
Last Updated
Jul 30, 2026
Description
🔧 dataLib
Minecraft Java Edition 26.2 | Multiplayer-Safe | Pure Datapack
Current version: v6.0.1
This datapack is considered safe to use, but it is still actively receiving security improvements, bug fixes, and new features. Please keep it up to date.
Do not copy datalib:input or datalib:engine into your own datapack. It is an internal implementation detail and may change without notice between releases.
⚠️ A /reload is still required after installation or after adding the load hook below. Automatic first-join initialization is not implemented in this version — do not rely on this until verified in-game with repeated reloads.
🛡️ This is a Minecraft Datapack — it contains no executables or scripts outside of .mcfunction files. Some antivirus software may flag .mcfunction files as suspicious due to macro-like syntax. This is a false positive. The pack has been scanned on VirusTotal and returned clean. Only download from this official repository. Do not trust redistributed or repackaged versions from third-party sources.
📦 Installation
-
Place dataLib.zip into <world>/datapacks/
-
Add the following logic to your datapack's load tag. Replace <namespace> with your own datapack's namespace (e.g. mypack) — this applies only to the function names, never to datalib:engine, which is dataLib's own fixed storage and must not be changed:
Fixed bug: an earlier version checked datalib:engine {global:{loaded:1b}} in the trigger but set <namespace>:engine loaded_datalib in the guard — two different storages, two different paths. The set never satisfied the trigger's condition, so load_datalib re-ran every time the load tag fired. This doesn't crash anything, but it silently re-triggers dl_load:load/yes and fork_no on every reload, which can accumulate side effects depending on what those functions do. Both the check and the set must target datalib:engine global.loaded. If you're updating from an older copy of this README, verify by reloading multiple times and confirming load_datalib does NOT re-run after the first load.
🏗️ Storage Architecture
datalib:engine (persistent data) ├── global │ ├── version: "v6.0.1" │ ├── loaded: 1b │ └── tick: <int> ├── players │ └── Steve { coins:150, level:5, xp:2300, online:1b, ... } ├── queue │ └── [{func:"mypack:event/end", delay:100}] ├── cooldowns │ └── Steve { fireball: 2460, dash: 1870 } ← expiry ticks └── events └── on_join: [{func:"mypack:welcome"}, {func:"mypack:xp_bonus"}] datalib:input (sending data to a function) datalib:output (receiving results from a function)Note: All dataLib-owned state lives under the datalib: namespace only. Never mix a consuming pack's own namespace into dataLib's load-flag logic — that mismatch was the source of the bug above.
📦 Dependencies
Lantern Load
Repository: https://github.com/LanternMC/load
License: BSD 0-Clause (public domain)
Provides deterministic load order, version tracking, and pre/load/post-load hooks.
# Check if dataLib is loaded execute if score #dataLib load.status matches 1.. run say dataLib is loaded # Get version (major*10000 + minor*100 + patch → v6.0.1 = 601) scoreboard players get dataLib load.statusStringLib
Repository: https://github.com/CMDred/StringLib
License: MIT
Bundled under the stringlib namespace. Exposed via datalib:core/lib/string/*.
Function Description lib/string/concat Join a string array lib/string/find Find substring index lib/string/replace Replace substring lib/string/split Split by separator lib/string/insert Insert at index lib/string/to_lowercase Lowercase (A–Z, fast) lib/string/to_uppercase Uppercase (a–z, fast) lib/string/to_number String → numeric NBT lib/string/to_string Value → stringAll functions read from datalib:input and write to datalib:output string.result.
data modify storage datalib:input string set value "Hello World" data modify storage datalib:input find set value "World" data modify storage datalib:input replace set value "Everyone" function datalib:core/lib/string/replace # datalib:output string.result → "Hello Everyone"💬 Support
dataLib v6.0.1 | MC Java 26.2 | Pure Datapack
Compatibility
Mod Loaders
Game Versions
Recommended Gear
AffiliateHardware and extras that pair well with this mod.
As an Amazon Associate I earn from qualifying purchases.
Screenshots
Similar Mods
Open Parties and Claims: Warfare
Turn OPaC claims into battlefields with chunk wars, raid rules, claim protection, and Xaero/Create support.
NhatJS's Enhanced Furniture Mod
Add reimplemented and new enhanced furnitures and cool electronic to your new Minecraft from old Furniture Mod!
Create: Envelope compatibility
Adds compatibility with Envelope mod to automate pigeons and delivery
Extra Animations
Adds some missing animations to the game
OneLayer
Superflat world with all biomes and structures
Cobblemon EvoNotify
An evolution popup telling you when your cobblemon can evolve.