-
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/addThis function should be called by the#minecraft:load.jsonfile when the Datapack is started. All initial values for a storage are set in this file. -
<namespace>:storage/removeThis function should be called by the<namespace>:uninstallfunction 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>.datinside thesaves/<world>folder can be deleted, because Minecraft doesn't remove empty storage files by itself.