Data loading conditions

Both Forge, Neoforge, and Fabric have additional datapack functionality where both modders and modpack developers can dynamically disable/enable data files based on given criteria. These criteria can range from checking if a tag/item exists in the registry, or simply disabling the file outright. A common application of this is disabling files with false conditions as shown below.

Forge

{
    "conditions": [
        { "type": "forge:false" }
    ]
}

NeoForge

{
    "neoforge:conditions": [
        { "type": "neoforge:false" }
    ]
}

Fabric

{
   "fabric:load_conditions": [
     {
       "condition": "fabric:not",
       "value": {
         "condition": "fabric:any_mod_loaded",
         "values": [
           "minecraft"
         ]
       }
     }
   ]
 }
info

More information on the types of loading conditions supported by modloaders can be found on their wikis, listed below.

Forge Neoforge Fabric

Tags: neoforgeforge