
Support more complex warp requirements as data packs
BlayTheNinth opened this issue ยท 0 comments
Currently warp requirements are still limited by the fact that they use a custom syntax designed for simple inline strings. For example, it would get fairly difficult to express NBT data.
It would be nice if alongside the existing system, the config option could also reference a rule from a data pack, which could then be defined as regular json. In the background we could convert any inline rules to the json-based structured data as well so that we'd continue to have just one single representation in code.
A datapack defining custom rules would only provide them for optional use, the source of truth on which rules should apply would still be the config option, e.g.
warpRequirements = ["import(mydatapack:mycustomrule)"]
In Unbreakables we achieve a similar thing through a "rulesets" config option seperate to "rules", but since order matters in Waystones a custom import()
rule works better here.
I do not want to get rid of the custom format because it has shown itself to be fairly intuitive and can easily be embedded in the existing config file to cover the majority of use cases. However, since the same system is also in use by Unbreakables, perhaps it could be extracted into a lightweight Jar-in-Jar dependency (I don't believe it has a place in Balm).