Carrots Library — Reference
Core Mechanics
The library introduces several backend systems that modify how items and data are handled in the game engine.
Armor Liner Framework
One of the most significant systems provided by the library is the logic for the Armor Liner system. This allows other mods to attach "liners" to existing armor pieces via NBT data. This system is designed to be non-destructive, meaning it can apply temperature-regulating properties to any vanilla or modded armor without overwriting the armor's original stats or enchantments.
Recipe Conditions
Carrots Library adds custom recipe conditions to the Forge loading system, specifically the carrots:tag_exists condition. This allows modpack creators and the library's own dependent mods to dynamically enable or disable recipes based on whether specific item tags, potions, or enchantments are present in the current mod environment.
Tag and NBT Support
The library includes specialized classes for handling complex item tags. This includes a denylist for random enchantments (carrots:random_enchants_denylist), ensuring that certain powerful or incompatible enchantments are excluded from loot tables and random generation functions.
Items
While primarily a library, the mod adds several base items that serve as templates or functional tools for its dependent mods. These items often feature advanced logic, such as the ability to be consumed directly or used in fluid tanks.
| Item | Description | Special Properties |
|---|---|---|
| Cow's Milk Bucket | A drinkable version of the standard milk bucket. | Can be consumed directly; supports fluid tank storage. |
| Oat Milk Bucket | A plant-based milk alternative. | Used in various food recipes; features a custom 'flat' color set. |
| Potable Water Bucket | Purified water used for survival. | Can be chilled or heated when integration plugins are active. |
| XP Bucket | A bucket containing liquid experience. | Allows for the transport and storage of experience points as a fluid. |
| Tonic Bucket | A high-capacity container for potion effects. | Provides 4x the duration of a standard potion bottle. |
Tonic Buckets
Tonic Buckets are a unique item class within the library. They track specific NBT tags such as 'fortified' and 'hidden', which are used by the Vanilla Food Pantry mod to create advanced status-effect liquids. They are compatible with most generic fluid tanks and display the dominant potion color when stored.