-
Notifications
You must be signed in to change notification settings - Fork 0
Storage
Mqx edited this page Feb 20, 2025
·
1 revision
If your datapack creates storages, the following directory structure should exist:
Datapack/
├─ pack.mcmeta
└─ data/
└─ <namespace>/
└─ function/
└─ storage/
├─ add.mcfunction
└─ remove.mcfunction
-
<namespace>:storage/add
This function should be called by the#minecraft:load.json
file when the Datapack is started. All initial values for a storage are set in this file. -
<namespace>:storage/remove
This function should be called by the<namespace>:uninstall
function when the datapack is removed. In this file, all storages that were previously created are removed so that no artifacts are left behind. It is also recommended to inform the user that after removing the storages thestorage_<namespace>.dat
inside thesaves/<world>
folder can be deleted, because Minecraft doesn't remove empty storage files by itself.