介绍
DISCLAIMER
I have received multiple reports of an issue regarding invalid entries in the LibCD mod jSON. THIS DOES NOT CAUSE A CRASH. THIS IS NOT THE REASON YOUR PACK IS NOT LOADING. PLEASE LOOK FURTHER IN THE LOG FOR THE REAL CAUSE OF THE CRASH.
LibCapableData, or LibCD, adds various hooks to make data packs more usable.
Conditional Data
LibCD’s original function was as a hook to conditionally load data pack elements based on a metadata file. It’s focused on being simple and extensible, along with being compatible with any resource type added by other mods. This mod requires the Fabric launcher for Minecraft 1.14 and above.
For conditional resources, add a file <target resource with extension>.mcmeta. This will be parsed as JSON to check whether the resource should be loaded. Each key-value pair will specify a condition that must be met for the recipe to be loaded. There are four conditions pre-included, and other mods may add their own:
libcd:mod_loaded(passed a string): Will return true if a mod with the given mod ID is loaded.libcd:item_exists(passed a string): Will return true if an item with the given item ID is loaded.libcd:not(passed a single-element json object) Will return true if the condition listed in the given object is not true.libcd:any_of(passed a json object): Will return true if any condition listed in the given object is true.
WARNING: Currently, conditions silently return false if they are passed an improper parameter. This will hopefully be changed in the future, but if you think something should be loaded and it isn’t, check your conditions.
Developer Use
LibCD allows any mod to register their own conditions, to prevent recipe loadin based on config or more advanced logic. LibCD is available on the Cotton maven.
To add a new condition, call LibConditionalData.registerCondition(), passing an Identifier for the condition’s name and a `Predicate for the use of the condition.
The Object passed to the predicate will be a boxed primitive (Integer, Float, Boolean, etc.), a String, a List, a JsonObject, or null. Use an instanceof check to be sure what you’re being passed.
For information on creating Tweaker utilities, check the LibCD wiki page.
常见问题
LibCapableData (LibCD) 支持哪些 Minecraft 版本?
LibCapableData (LibCD) 支持 Minecraft Java 版 1.14.3–1.16.5,共 11 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
LibCapableData (LibCD) 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
LemmaEOF 的其他作品
查看全部 →Ears
几乎适用于所有版本的更多皮肤自定义选项,以及对 1.9 之前版本的皮肤回移植与修复。
Better Boilers
Semi-free-form multiblock steam boilers
Iron Bundles
Higher-capacity bundles for Fabric and 1.17
Cotton
Common materials for making Fabric mods
评论
登录后评论和评分