Download LibCapableData (LibCD) — Minecraft Mods — MetaMods

LibCapableData (LibCD)

Active

Downloads

2

Last update

4 years ago
Client
Fabric
Quilt
Forge
Neoforge
Libraries
Utils

LibCapableData (LibCD)

Important Note: We have received several reports about issues in LibCD JSON files. Please note that this DOES NOT CAUSE game crashes. If your pack isn't loading - look for the real cause in the system logs.

What is LibCD?

LibCapableData (LibCD) is an extension for Minecraft that enhances data pack capabilities through the Fabric loader. This mod provides useful tools for managing game data loading in version 1.14 and above.

Conditional Resource Loading

The mod's primary function is to provide a system for controlled loading of data pack elements based on metadata. The system excels in ease of use, scalability, and compatibility with any resource types added by other modifications.

How it works: Create a file like <target resource with extension>.mcmeta. This file will be processed in JSON format to determine whether to load the corresponding resource. Each key-value pair specifies a mandatory condition for activation.

Standard Conditions:

  • libcd:mod_loaded (string parameter) - activates when the specified mod is loaded
  • libcd:item_exists (string parameter) - checks for item existence by its ID
  • libcd:not (single JSON object) - works as logical "NOT" for conditions
  • libcd:any_of (JSON object) - triggers when any of the listed conditions are met

Important: Conditions may currently return false without notification if there are parameter errors. When experiencing loading issues, carefully check your condition settings.

For Developers

LibCD enables registration of custom conditions to block content loading based on configuration files or complex logic.

To add a new condition, use the LibConditionalData.registerCondition() command, specifying the condition name identifier and Predicate for its processing.

The object passed to the predicate may contain primitives (Integer, Float, Boolean), strings, lists, JsonObject, or null values. Use instanceof checking to determine the type of data being received.

Project members
LemmaEOF

LemmaEOF

Created: 31 Jan 2021

ID: 26474