This version contains fixes and features from 1.20.2 - 1.20.4 update.
Quick summary:
🚀 Biggest Feature: Function Macros are supported by utilizing the context and adding arguments to File. Read more about it in this guide: https://objd.stevertus.com/basics/#macros-function-arguments
For now, Strings, ints, double, Scores, Entities and Locations arguments are supported, with room to customize it.
To write the macro line $data merge entity ${eArg} {uuid:[I;1,2,3,${iArg}]}
, you can use for instance:
Widget generate(Context context) {
final iArg = c.intArgument('iArg');
final Entity eArg = c.argument('eArg');
return Data.merge(eArg, nbt: {
"uuid": UUID(1, 2, 3, iArg),
}),
}
📦 New features, blocks, items, entities and particles from Minecraft 1.20.1 onwards are implemented: New Random Wrapper and Return Updates; Project version is now by default 1.20.4 and it is possible to override packVersion and supportedFormats
📃 Improvements to nbt serialization, in particular a new UUID object and serialization for Entity, TextComponent and Effect
🔨 Lots of fixes for critical bugs
0.4.7
- added arguments methods on context to generate macro commands introduced in 1.20.2
- added Random Widget
- added Return.run and Return.fail subcommands
- added supportedFormats and packFormat to Project, default version is now 20.4
- added arguments field for File.execute to run functions with arguments
- updated blocks, items, particles and entities to include content from 1.20.4 and 23w51b
- updated documentation links to the new minecraft wiki https://minecraft.wiki (thanks @Spongecade)
- fixed Entity to introduce a trailing comma when given empty tags
- fixed Entity.Clone to deep copy, instead of shallow copy (thanks @CCpcalvin)
0.4.6
- added serializable UUID object to represent uuids consisting out of 4 integers (thanks @Globbi)
- changed TextComponent & Entity to be gson serializable, so you don't have to call toMap manually
- refactored Title widget
- fixed function tags load/tick generating with paths with
.mcfunction
(thanks @FlafyDev) - fixed Storage.copyScore ignoring the scale parameter
- fixed Github testing workflows to run with Dart 3 and provide Code Coverage (thanks @Globbi)
Shoutouts to @Globbi, @Spongecade, @FlafyDev, halo jalon and @CCpcalvin for contributing and submitting bugs