Skip to content

Path Resolvers [Hard Dependency]

TheInsanityGod edited this page Sep 23, 2026 · 2 revisions

Overview

Path Resolvers are for allowing mods to use code values from JSON, supported places are:

  • Basic Registry Objects (Items, Blocks, Entities)
  • Patches
  • Anything loaded using GetManyExtended method, which is automatically used for classes using the [AssetCategory] attribute.

Basic format is: scheme://path, where scheme decides the Resolver and Path is used by the Resolver to get the value.

InsanityLib provides the following schemes:

Prefixes

paths can be prefixed with the following symbols to change the result:

  • ! checks if the value is falsy (null, 0, empty string, false)
  • - turns objects to their negative value (so 10 -> -10)

Examples

"config://!WearAndTear/Server/MainConfig/AllowForInfiniteMaintenance" will turn into true if AllowForInfiniteMaintenance is set to false in the WearAndTear/Server/MainConfig AutoConfig.

Clone this wiki locally