LibCapableData (LibCD)

Quick rating

Community listing page, reviews here may not be monitored by the author.

LibCapableData (LibCD)

No reviews yet

Improved data processing for Fabric and 1.14

Mod Loaders
Fabric
Minecraft

Community voices

Reviews

List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Show per page
10
25
50
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

About

Project Details

Type
Mod
Latest Version
3.0.3+1.16.3

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID

Resources

External Links

About

Description

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.

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~160,000
Downloads
Last Updated
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works