Releases: CottonMC/LibCD
Releases · CottonMC/LibCD
Crash fix
Fix a bug where recipe tweakers would fail if a recipe type wasn't properly registered in the Mojang registry
Crash fix
Fix a bug where recipe tweakers would fail if a recipe type wasn't properly registered in the Mojang registry
1.15 Port
- Port release 1.6.0 to Minecraft 1.15 snapshots
- The
/libcd held
command now copies the returned message to your clipboard instead of pasting it in your chat bar
Further Extended Recipe Tweakers
- Add a recipe builder system for assembling recipes without explicit LibCD support
- Mixin vanilla cooking (smelting, blasting, smoking, and campfire) and cutting (stonecutting) recipe serializers to accept ItemStack objects for the result instead of just strings
- Move
/cd_subset
command to/libcd subset
- Add
/libcd debug export
command for exporting lists of all added and removed recipes to a JSON file - Add methods to remove all non-tweaker recipes with a given item as the output
- Certain types of shaped recipes will print a stacktrace when they error (will be removed next release)
Extended tweakers
- added support for patterns of sizes greater than 3x3
- added a method to allow support scripts to access RecipeTweaker's logger
Item stack outputs, assistant factories, logging [BREAKING CHANGES]
- All recipe-add methods now take an
Object
for the output instead of anItemStack
, allowing use of Strings- format is
item:id{nbt:tag}@5
- BREAKING CHANGE:
RecipeTweaker.addShaped(String[] pattern, Map<String, Object> dictionary, ItemStack output)
is nowaddDictShaped(String[] pattern, Map<String, Object> dictionary, Object output)
due to method erasure issues
- format is
- added new `Tweaker#addAssistantFactory method that allows tweaker assistants to modify themselves based on the ID of the current script being executed
- added new default void
Tweaker.prepareFor(id)
method to update tweakers for the current ID - Recipes added through
RecipeTweaker
now match the namespace of the script they were added in - All scripts have access to a
log
object which allows them to print to log with the namespace as a prefix
- added new default void
RecipeTweaker
now throws if anything attempts to add a recipe outside of resource-reload time
Tag Extensions and More
- Added Tag Extensions.
- A
libcd
block in a tag JSON can add new entries to a tag based on Conditions. - See the wiki for details.
- A
- Fixed a bug where trying to add a 1D array shaped recipe with no group would only accept strings.
- Fixed a bug where trying to construct a shaped recipe from a 2D array would fail when the recipe dimensions were greater than 2x2.
- Added new
createItemStack
methods which take either a String or an Item and return item stacks with a size of 1. - Fixed a bug where the LibCD tweaker sample script would apply in runtime environments.
- Fixed a bug where malformed Condition mcmeta files would still evaluate to true when they shouldn't.
Bug fixes and improvements
- fixed a bug where recipes with the same output item couldn't be registered simultaneously
- fixed a bug where lore would not be properly added to an item with
TweakerUtils.addLore()
- added the sample script to the mod data pack
- added a new condition for
dev_mode
so the sample script will only be loaded in a mod dev environment or when thedev_mode
config option is true
- added a new condition for
NBT Manipulation
- Fixed a bug where
TweakerUtils.createIngredient()
would fail on dedicated servers. - Created new
WrappedCompoundTag
andWrappedListTag
classes to be able to interact with and manipulate NBT from scripts.- Added a new
addNbtToStack()
method that usesWrappedCompoundTag
instead of a String. - Added a new
getStackTag()
method to get a mutableWrappedCompoundTag
from a stack. - Fleshed out the
StackInfo
class with newWrappedCompoundTag
read-only access to stack NBT. - Added an
NbtUtils
class for various NBT manipulation utils.
- Added a new
- Added javadocs for
StackInfo
, and moved toutil
package.
Commands and NBT stacks
TweakerUtils.createItemStack
now supports command-style NBT adding.- Added
/libcd held
to print out the current held item, including NBT, to the chat log. - Updated to Minecraft 1.14.4.
- Fixed various issues with fabric.mod.json.
- Fixed a bug where condition mcmetas were passed improper JSON objects.
- Fixed a bug where the
or
condition acted like an and instead.