Hocon Resource Loader

Hocon Resource Loader

Mod

Loading packs' files ending with `.hocon` as hocon format

Client or server ManagementUtility

1,158 downloads
4 followers
Follow Save
90% of ad revenue goes to creators. Go ad-free while supporting creators with Modrinth Plus. Subscribe today!

This mod is for using HOCON for resource packs or data packs
HOCON's syntax is more flexible and supports advanced syntax such as variables and include, which can reduce boilerplate code.
The mod will load any file in packs ends with .hocon with HOCON parser and trick the game to think it's a json file.
So that it shouldn't conflict with any packs that already use the json format.

Need to enable in pack.mcmeta lie below:

{
    "pack": {
        "pack_format": 15,
        "description": {
            "translate": "settingsun.pack",
            "fallback": "Assets of SettingSun"
        },
        "supported_formats": [15, 22]
    },
    "hoconresourceloader" : {
        "enabled": true
    }
}

Advantage of HOCON

  • include url, file (Can be used for resource/data pack config), minecraft resource by identifier
  • With include, you can include the origin json file and modify the value instead of edit the whole file. Far more convenient than the JsonPatch
  • See more on https://github.com/lightbend/config/blob/main/HOCON.md

Examples

The result of the resource pack at https://github.com/SettingDust/HoconResourceLoader/tree/main/mod/run/resourcepacks/test-resources

Credit

Icon from https://www.flaticon.com/free-icon/folder_3767084#


Project members

settingdust

Member

Details

Licensed MIT
Published 10 months ago
Updated 5 months ago