Home›Java›Mods›LibCapableData (LibCD)
LibCapableData (LibCD)
ModsJava

LibCapableData (LibCD)

Java mod listed for Minecraft 1.16. Downloads from the MC Java Mods app on Android.

by LemmaEOF · on CurseForge

Which Minecraft do you have?

Every version of the game needs its own build. Pick yours, then download — the wrong build installs fine and then does nothing in the game. This mod is built for Fabric only.

⬇ Download for 1.16.3–1.16.5⬇ Download for 1.16.2⬇ Download for 1.16–1.16.1
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

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:

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.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more