Skip to content

Releases: CottonMC/LibCD

Tag extension fix

24 Sep 10:28
Compare
Choose a tag to compare

Fixes the tag extension system reading from the root JSON object instead of the libcd block.

Mixin fix, part 2

18 Aug 11:24
Compare
Choose a tag to compare

Fix another mixin-related issue, along with a config issue

Mixin fix

18 Aug 11:15
Compare
Choose a tag to compare

Fix an issue where LibCD thought it should apply mixins that do not exist

1.16.2 Update: The Great Scale-Back™

18 Aug 06:03
Compare
Choose a tag to compare
  • 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

26 Jun 03:35
Compare
Choose a tag to compare
  • Update to Minecraft 1.16.1
  • Split LibCDInitializer into three separate entrypoints
    • libcd:tweakers (class TweakerInitializer) initializes the tweaker manager, libcd:conditions(class ConditionInitializer) initializes the condition manager, and libcd:advancement_rewards (class AdvancementInitializer) initializes the advancement reward manager
    • the libcd (class LibCDInitializer) 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 ScriptBridge for 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) (if null is returned then output will be treated as the output stack)
      • void craft(StackInfo[] stacks, int width, int height, WrappedPlayer player, StackInfo output)
    • the same ScriptBridge may be passed for multiple different recipes

Stack factory fix

18 May 23:22
Compare
Choose a tag to compare

Fix an issue where RecipeParser#processItemStack would fail to properly interpret tweaker stack factories.

Parity

24 Apr 00:23
Compare
Choose a tag to compare

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

24 Apr 00:05
Compare
Choose a tag to compare

Adds a system for declaring and getting default items for tags.

  • The libcd block 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.getDefaultItem method for getting the default value of an item tag.
  • Loot tweakers can now use the Entries.defaultedTag method to create a loot entry based on a libcd:defaulted_tag entry.
  • 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_exists and libcd:block_tag_exists now require the tag to have at least on entry to be considered existent.
  • Inside of obfuscation, the TagHelper class and its TagHelper.ITEM implementation provide access to default resources at any time.

Advancement Handlers

10 Feb 21:48
Compare
Choose a tag to compare
  • Fix a crash with item_tag_exists and block_tag_exists conditions
  • Add system for custom advancement handlers (documentation coming soon)

1.15.2 update

28 Jan 08:27
Compare
Choose a tag to compare

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.