Releases: CottonMC/LibCD
Tag extension fix
Fixes the tag extension system reading from the root JSON object instead of the libcd block.
Mixin fix, part 2
Fix another mixin-related issue, along with a config issue
Mixin fix
Fix an issue where LibCD thought it should apply mixins that do not exist
1.16.2 Update: The Great Scale-Back™
- Update to Minecraft 1.16.2
- Remove tweakers and all associated systems. This is a breaking change.
- LibCD is now 47 KB (15% the size of 2.5.0), small enough to JiJ without worrying about excess bloat.
Tweakers will return in a new project with an altered scope. Please be patient while I work on this.
1.16 Update, Custom Recipes
- Update to Minecraft 1.16.1
- Split
LibCDInitializerinto three separate entrypointslibcd:tweakers(classTweakerInitializer) initializes the tweaker manager,libcd:conditions(classConditionInitializer) initializes the condition manager, andlibcd:advancement_rewards(classAdvancementInitializer) initializes the advancement reward manager- the
libcd(classLibCDInitializer) entrypoint still exists and is run for all three initializations, as well as extending all three other initializers
- Add in support for smithing recipes to
RecipeTweaker - Add in a system for defining crafting recipes with custom scripted requirements and behaviors
- Custom recipes can be shaped, shapeless, or special crafting recipes, and are registered with their respective methods in
RecipeTweaker - Custom recipes must provide a
ScriptBridgefor a script that defines three functions:boolean matches(StackInfo[] stacks, int width, int height, WrappedPlayer player, WorldInfo world)@Nullable Object preview(StackInfo[] stacks, int width, int height, WrappedPlayer player, MutableStack output)(ifnullis returned thenoutputwill be treated as the output stack)void craft(StackInfo[] stacks, int width, int height, WrappedPlayer player, StackInfo output)
- the same
ScriptBridgemay be passed for multiple different recipes
- Custom recipes can be shaped, shapeless, or special crafting recipes, and are registered with their respective methods in
Stack factory fix
Fix an issue where RecipeParser#processItemStack would fail to properly interpret tweaker stack factories.
Parity
Carry over 2.4.0+1.15.2 to 1.16 snapshots. Only works on 20w17a and above.
For more information, see the 2.4.0+1.15.2 patch notes.
Default items
Adds a system for declaring and getting default items for tags.
- The
libcdblock of a tag JSON can now take a"default"field with an item ID, specifying the default item for that tag. If no tag JSONs for a given tag ID define a default, then the default will be selected based on namespace preference defined in the config. - Recipe JSON
"result"fields can have a"tag"field instead of an"item"field to use the default value of that tag for item output. - Loot tables can use a
"libcd:defaulted_tag"entry to drop the default value of that tag for item output. - Recipe tweakers can use a
#at the beginning of an output string to get the default value of an item tag for item output. - Tweakers can alternatively use the
TweakerUtils.getDefaultItemmethod for getting the default value of an item tag. - Loot tweakers can now use the
Entries.defaultedTagmethod to create a loot entry based on alibcd:defaulted_tagentry. - Cooking and cutting recipe JSONs can now take an object for their respective
"result"fields along with the standard string value, allowing them to use default items and NBT in outputs. - The conditions
libcd:item_tag_existsandlibcd:block_tag_existsnow require the tag to have at least on entry to be considered existent. - Inside of obfuscation, the
TagHelperclass and itsTagHelper.ITEMimplementation provide access to default resources at any time.
Advancement Handlers
- Fix a crash with
item_tag_existsandblock_tag_existsconditions - Add system for custom advancement handlers (documentation coming soon)
1.15.2 update
Update code-side to 1.15.2. Should remain compatible with 1.15.1. A forced loom refresh means that this version should not have any more mixin issues.